The IBM XL C/C++ compiler V12.1 supports a new option called -qoptfile. You can use this option to specify a file containing a list of additional command line options to be used for the compilation.
This is the syntax of this option:
Here filename specifies the name of the file that contains a list of additional command line options. The file is a plain text file with one or more command lines options per line. filename can contain a relative path or absolute path, or it can contain no path.
The following is an example of specifying an option file.
$ cat options.file
# To perform optimization at -O4 level, and high-order
# loop analysis and transformations during optimization
# To generate position-independent code
$ xlC -qlist -qoptfile=options.file -qipa test.c
The example above is equivalent to the following invocation:
$ xlC -qlist -O4 -qhot -qpic -qipa test.c
For more information about this option, see the -qoptfile topic in the XL C/C++ for AIX, V12.1 Compiler Reference.