-qoptfile
Category
@PROCESS directive
None.
Purpose
Specifies a response file that contains a list of additional command line options to be used for the compilation. Response files typically have the .rsp suffix.
Defaults
None.
Parameters
- filename
- Specifies the name of the response file that contains a list of additional command line options. filename can contain a relative path or absolute path, or it can contain no path. It is a plain text file with one or more command line options per line.
Usage
- Specify the options you want to include in the file with the same syntax as on the command line. The response file is a whitespace-separated list of options. The following special characters indicate whitespace: \n, \v, \t. (All of these characters have the same effect.)
- A character string between a pair of single or double quotation marks are passed to the compiler as one option.
- You can include comments in the response file. Comment lines start with the # character and continue to the end of the line. The compiler ignores comments and empty lines.
When processed, the compiler removes the -qoptfile option from the command line, and sequentially inserts the options included in the file before the other subsequent options that you specify.
The -qoptfile option is also valid within a response file. The files that contain another response file are processed in a depth-first manner. The compiler avoids infinite loops by detecting and ignoring cycles in response file inclusion.
If -qoptfile and -qsaveopt are specified on the same command line, the original command line is used for -qsaveopt. A new line for each response file is included representing the contents of each response file. The options contained in the file are saved to the compiled object file.
Example 1
This is an example of specifying a response file.
$ cat options.rsp
# To perform optimization at -O3 level, and high-order
# loop analysis and transformations during optimization
-O3 -qhot
# To indicate that the input source program is in fixed source form
-qfixed
$ xlf95 -qlist -qoptfile=options.rsp -qipa test.f
The
preceding example is equivalent to the following invocation:$ xlf95 -qlist -O3 -qhot -qfixed -qipa test.f
Example 2
This is an example of specifying a response file that contains -qoptfile with a cycle.
$ cat options.file1
# To perform optimization at -O3 level, and high-order
# loop analysis and transformations during optimization
-O3 -qhot
# To include the -qoptfile option in the same response file
-qoptfile=options.file1
# To indicate that the input source program is in fixed source form
-qfixed
# To indicate that the source code is in free source form
-qfree
$ xlf95 -qlist -qoptfile=options.file1 -qipa test.f
The
preceding example is equivalent to the following invocation:$ xlf95 -qlist -O3 -qhot -qfixed -qfree -qipa test.f
Example 3
This is an example of specifying a response file that contains -qoptfile without a cycle.
$ cat options.file1
-O3 -qhot
-qoptfile=options.file2
$ cat options.file2
-qfixed
$ xlf95 -qoptfile=options.file1 test.f
The preceding example is equivalent to the following invocation:$ xlf95 -O3 -qhot -qfixed test.f
Example 4
This is an example of specifying -qsaveopt and -qoptfile on the same command line.
$ cat options.file3
-O3
-qassert=contiguous
$ xlf95 -qsaveopt -qipa -qoptfile=options.file3 test.f -c
$ what test.o
test.o:
opt f xlf95 -qsaveopt -qipa -qoptfile=options.file3 test.f -c
optfile options.file3 -O3 -qassert=contiguous



