This section lists and describes XL C/C++ command line options.
To get detailed information on any option listed, see the full description page(s) for that option. Those pages describe each of the compiler options, including:
Specify Compiler Options on the Command Line
Specify Compiler Options in Your Program Source Files
Specify Compiler Options in a Configuration File
Specify Compiler Options for Architecture-Specific, 32- or 64-bit Compilation
Resolving Conflicting Compiler Options
General Purpose Pragmas
Pragmas to Control Parallel Processing
Option Name | Type | Default | Description |
---|---|---|---|
+ (plus sign) | -flag | - |
![]() |
# (pound sign) | -flag | - | Traces the compilation without doing anything. |
32, 64 | -qopt | 32 | Selects 32- or 64-bit compiler mode. |
abi_version | -qopt | See abi_version. |
![]() |
aggrcopy | -qopt | See aggrcopy. | Enables destructive copy operations for structures and unions. |
alias | -qopt | See alias. | Specifies which type-based aliasing is to be used during optimization. |
align | -qopt | linuxppc | Specifies what aggregate alignment rules the compiler uses for file compilation. |
alloca | -qopt | - |
![]() |
altivec | -qopt | noaltivec | Enables compiler support for AltiVec(TM) data types. |
arch | -qopt | arch=ppcv | Specifies the architecture on which the executable program will be run. |
asm | -qopt | -qasm=gcc | Controls the interpretation of and subsequent code generation for asm statements. |
attr | -qopt | noattr | Produces a compiler listing that includes an attribute listing for all identifiers. |
B | -flag | - | Determines substitute path names for the compiler, assembler, linkage editor, and preprocessor. |
bigdata | -qopt | nobigdata | In 32-bit mode, allows initialized data to be larger than 16 MB in size. |
bitfields | -qopt | bitfields=signed | Specifies if bit fields are signed. |
C | -flag | - | Preserves comments in preprocessed output. |
c | -flag | - | Instructs the compiler to pass source files to the compiler only. |
c_stdinc | -qopt | - |
![]() |
cache | -qopt | - | Specify a cache configuration for a specific execution machine. |
chars | -qopt | chars=unsigned | Instructs the compiler to treat all variables of type char as either signed or unsigned. |
check | -qopt | nocheck | Generates code which performs certain types of run-time checking. |
cinc | -qopt | nocinc |
![]() |
compact | -qopt | nocompact | When used with optimization, reduces code size where possible, at the expense of execution speed. |
complexgccincl | -qopt | complexgccincl
=/usr/include | Instructs the compiler to internally wrap #pragma complexgcc(on) and #pragma complexgcc(pop) directives around include files found in specified directories. |
cpluscmt | -qopt | See cpluscmt. |
![]() |
cpp_stdinc | -qopt | - |
![]() |
crt | -qopt | crt | Instructs the linker to use the standard system startup files at link time. |
D | -flag | - | Defines the identifier name as in a #define preprocessor directive. |
dataimported | -qopt | - | Mark data as imported. |
datalocal | -qopt | - | Marks data as local. |
mbcs, dbcs | -qopt | nodbcs | Use the -qdbcs option if your program contains multibyte characters. |
dbxextra | -qopt | nodbxextra |
![]() |
digraph | -qopt | See digraph. | Enables the use of digraph character sequences in your program source. |
directstorage | -qopt | nodirectstorage. | Informs the compiler that write-through enabled or cache-inhibited storage may be referenced. |
dollar | -qopt | nodollar | Allows the $ symbol to be used in the names of identifiers. |
E | -flag | - | Instructs the compiler to preprocess the source files. |
e | -flag | - | Specifies the entry name for the shared object. Equivalent to using ld -e name. See your system documentation for additional information about ld options. |
eh | -qopt | eh |
![]() |
enablevmx | -qopt | noenablevmx | Enables generation of VMX (Vector Multimedia Extension) instructions. |
enum | -qopt | See enum. | Specifies the amount of storage occupied by the enumerations. |
F | -flag | - | Names an alternative configuration file for the compiler. |
flag | -qopt | flag=i:i | Specifies the minimum severity level of diagnostic messages to be reported. |
float | -qopt | See float. | Specifies various floating point options to speed up or improve the accuracy of floating point operations. |
flttrap | -qopt | noflttrap | Generates extra instructions to detect and trap floating point exceptions. |
fullpath | -qopt | nofullpath | Specifies what path information is stored for files when you use the -g option. |
funcsect | -qopt | nofuncsect | Place instructions for each function in a separate object file control section or csect. |
g | -flag | - | Generates debugging information for use by a debugger. |
gcc_c_stdinc | -qopt | - |
![]() |
gcc_cpp_stdinc | -qopt | - |
![]() |
genproto | -qopt | nogenproto |
![]() |
halt | -qopt |
![]() ![]() | Instructs the compiler to stop after the compilation phase when it encounters errors of specified severity or greater. |
haltonmsg | -qopt | - |
![]() |
hot | -qopt | nohot | Instructs the compiler to perform high-order loop analysis and transformations during optimization. |
I | -flag | - | Specifies an additional search path for #include filenames that do not specify an absolute path. |
idirfirst | -qopt | noidirfirst | Specifies the search order for files included with the #include " file_name" directive. |
ignerrno | -qopt | noignerrno | Allows the compiler to perform optimizations that assume errno is not modified by system calls. |
ignprag | -qopt | - | Instructs the compiler to ignore certain pragma statements. |
info | -qopt |
![]() ![]() | Produces informational messages. |
initauto | -qopt | noinitauto | Initializes automatic storage to a specified two-digit hexadecimal byte value. |
inlglue | -qopt | noinlglue | Generates fast external linkage by inlining the pointer glue code necessary to make a call to an external function or a call through a function pointer. |
inline | -qopt | See inline. | Attempts to inline functions instead of generating calls to a function. |
ipa | -qopt | See ipa. | Turns on or customizes a class of optimizations known as interprocedural analysis (IPA). |
isolated_call | -qopt | - | Specifies functions in the source file that have no side effects. |
keepparm | -qopt | nokeepparm |
![]() |
keyword | -qopt | See keyword. | Controls whether a specified string is treated as a keyword or an identifier. |
L | -flag | See L. | Searches the specified directory at link time for library files specified by the -l option. |
l | -flag | See l. | Searches a specified library for linking. |
langlvl | -qopt | See langlvl. | Selects the C or C++ language level for compilation. |
lib | -qopt | lib | Instructs the compiler to use the standard system libraries at link time. |
libansi | -qopt | nolibansi | Assumes that all functions with the name of an ANSI C library function are in fact the system functions. |
linedebug | -qopt | nolinedebug | Generates abbreviated line number and source file name information for the debugger. |
list | -qopt | nolist | Produces a compiler listing that includes an object listing. |
listopt | -qopt | nolistopt | Produces a compiler listing that displays all options in effect. |
longlit | -qopt | nolonglit | Makes unsuffixed literals the long type for 64-bit mode. |
longlong | -qopt | See longlong. | Allows long long types in your program. |
M | -flag | - | Creates an output file that contains targets suitable for inclusion in a description file for the make command. |
makedep | -qopt | - | Creates an output file that contains targets suitable for inclusion in a description file for the make command. |
maxerr | -qopt | nomaxerr | Instructs the compiler to halt compilation when a specified number of errors of specified or greater severity is reached. |
maxmem | -qopt | maxmem=8192 | Limits the amount of memory used for local tables of specific, memory-intensive optimizations. |
mbcs, dbcs | -qopt | nombcs | Use the -qmbcs option if your program contains multibyte characters. |
mkshrobj | -qopt | - | Creates a shared object from generated object files. |
minimaltoc | -qopt | nominimaltoc | Avoids toc overflow conditions in 64-bit compilations by placing toc entries into a separate data section for each object file. |
O, optimize | -qopt, -flag | nooptimize | Optimizes code at a choice of levels during compilation. |
o | -flag | - | Specifies an output location for the object, assembler, or executable files created by the compiler. |
P | -flag | - | Preprocesses the C or C++ source files named in the compiler invocation and creates an output preprocessed source file for each input source file. |
p | -flag | - | Sets up the object files produced by the compiler for profiling. |
path | -qopt | - | Constructs alternate program and path names. |
pdf1, pdf2 | -qopt | nopdf1, nopdf2 | Tunes optimizations through Profile-Directed Feedback. |
pg | -flag | - | Sets up the object files for profiling. |
phsinfo | -qopt | nophsinfo | Reports the time taken in each compilation phase. |
pic | -qopt | nopic | Instructs the compiler to generate Position-Independent Code suitable for use in shared libraries. |
prefetch | -qopt | prefetch | Enables generation of prefetching instructions in compiled code. |
-qopt | -qnoprint suppresses listings. | ||
priority | -qopt | - |
![]() |
proclocal, procimported, procunknown | -qopt | See proclocal. | Mark functions as local, imported, or unknown. |
proto | -qopt | noproto |
![]() |
Q | -flag | See Q. | Attempts to inline functions. |
R | -flag | See R. | Searches the specified directory at run time for shared libraries. |
r | -flag | - | Produces a relocatable object. |
report | -qopt | noreport | Instructs the compiler to produce transformation reports that show how program loops are parallelized and optimized. |
ro | -qopt | See ro. | Specifies the storage type for string literals. |
roconst | -qopt | See roconst. | Specifies the storage location for constant values. |
rtti | -qopt | rtti |
![]() |
S | -flag | - | Generates an assembly language file (.s) for each source file. |
s | -flag | - | Strips symbol table. |
saveopt | -qopt | nosaveopt | Saves the command line compiler options into an object file. |
showinc | -qopt | noshowinc | Used together with -qsource to selectively show user header files (includes using " ") or system header files (includes using < >) in the program source listing. |
showpdf | -qopt | noshowpdf | Used together with -qpdf1 to add additional call and block count profiling information to an executable. |
smallstack | -qopt | nosmallstack | Instructs the compiler to reduce the size of the stack frame. |
smp | -qopt | nosmp | Enables parallelization of program code. |
source | -qopt | nosource | Produces a compiler listing and includes source code. |
sourcetype | -qopt | sourcetype=default | Instructs the compiler to treat all source files as if they are the source type specified by this option, regardless of actual source filename suffix. |
spill | -qopt | spill=512 | Specifies the size of the register allocation spill area. |
srcmsg | -qopt | nosrcmsg |
![]() |
staticinline | -qopt | nostaticinline | Treats inline functions as being static. |
staticlink | -qopt | nostaticlink | Controls linking to shared libraries. |
statsym | -qopt | nostatsym | Adds user-defined, non-external names that have a persistent storage class to the name list. |
stdinc | -qopt | stdinc | Specifies which files are included with #include <file_name> and #include "file_name" directives. |
strict | -qopt | See strict. | Turns off aggressive optimizations of the -O3 option that have the potential to alter the semantics of your program. |
strict_induction | -qopt | See strict_induction. | Disables loop induction variable optimizations that have the potential to alter the semantics of your program. |
suppress | -qopt | See suppress. | Specifies compiler message numbers to be suppressed. |
symtab | -qopt | - | Determines what information appears in the symbol table. |
syntaxonly | -qopt | - |
![]() |
t | -flag | See t. | Adds the prefix specified by the -B option to designated programs. |
tabsize | -qopt | tabsize=8 | Changes the length of tabs as perceived by the compiler. |
tbtable | -qopt | See tbtable. | Sets traceback table characteristics. |
tempinc | -qopt | See tempinc. |
![]() |
templaterecompile | -qopt | See templaterecompile. |
![]() |
templateregistry | -qopt | templateregistry |
![]() |
tempmax | -qopt | tempmax=1 |
![]() |
threaded | -qopt | See threaded. | Indicates that the program will run in a multi-threaded environment. |
tls | -qopt | See tls. | Marks data as local. |
tmplparse | -qopt | tmplparse=no |
![]() |
tocdata | -qopt | notocdata. | Specifies the thread-local storage model to be used by the application. |
trigraph | -qopt | See trigraph. | Enables the use of trigraph character sequences in your program source. |
tune | -qopt | See tune. | Specifies the architecture for which the executable program is optimized. |
U | -flag | - | Undefines a specified identifier defined by the compiler or by the -D option. |
unroll | -qopt | unroll=auto | Unrolls inner loops in the program. |
unwind | -qopt | unwind | Informs the compiler that the application does not rely on any program stack unwinding mechanism. |
upconv | -qopt | noupconv |
![]() |
utf | -qopt | noutf | Enables recognition of UTF literal syntax. |
V | -flag | - | Instructs the compiler to report information on the progress of the compilation in a command-like format. |
v | -flag | - | Instructs the compiler to report information on the progress of the compilation. |
vftable | -qopt | vftable |
![]() |
vrsave | -qopt | vrsave | Controls function prolog and epilog code necessary to maintain the VRSAVE register. |
W | -flag | - | Passes the listed words to a designated compiler program. |
w | -flag | - | Requests that warning messages be suppressed. |
warn64 | -qopt | nowarn64 | Enables checking for possible data conversion problems between 32-bit and 64-bit compiler modes. |
xcall | -qopt | noxcall | Generates code to treat static routines within a compilation unit as if they were external calls. |
xref | -qopt | noxref | Produces a compiler listing that includes a cross-reference listing of all identifiers. |
y | -flag | - | Specifies the compile-time rounding mode of constant floating-point expressions. |