Specifying compiler options on the command line
There are two kinds of command-line options:
- -qoption_keyword (compiler-specific)
- Flag options (available to z/OS® XL C/C++ compilers in z/OS UNIX System Service environment)
Command-line options in the -q option_keyword format are similar to on and off switches. For most -q options, if a given option is specified more than once, the last appearance of that option on the command line is the one recognized by the compiler. For example, qsource turns on the source option to produce a compiler listing, and -qnosource turns off the source option so that no source listing is produced.
xlC -qnosource MyFirstProg.C -qsource MyNewProg.C
You can have multiple -q option_keyword instances in the same command line, but they must be separated by blanks. Option keywords can appear in mixed case, but you must specify the -q in lowercase.
xlC -qLIST -qnomaf file.c
xlC file.c -qxref -qsource
Some options have suboptions. You specify these with an equal sign following the -qoption. If the option permits more than one suboption, a colon (:) must separate each suboption from the next.
xlc -qipa=level=2:map:noobj -qattr=full file.c