-X (-W)
Category
Pragma equivalent
None.
Purpose
Passes the listed options to a component that is executed during compilation.
Syntax
.--------------------------. V | >>- -X----+-assembler----+--option-+--------------------------->< +-preprocessor-+ '-linker-------'
.-------. .-----------. V | V | >>- -W----+-a-+-+----,--option-+------------------------------->< +-b-+ +-c-+ +-C-+ +-d-+ +-I-+ +-L-+ +-l-+ '-p-'
Parameters
- option
- Any option that is valid for the component to which it is being passed.
The following table shows the correspondence between -X or -W parameters and the component names:
Parameter of -W | Parameter of -X | Description | Component name |
---|---|---|---|
a | assembler | The assembler | as |
b | The low-level optimizer | xlCcode | |
c, C | The C and C++ compiler front end | xlCentry | |
d | The disassembler | dis | |
I (uppercase i) | The high-level optimizer, compile step | ipa | |
L | The high-level optimizer, link step | ipa | |
l (lowercase L) | linker | The linker | ld |
p | preprocessor | The preprocessor | xlCentry |
Usage
In the string following the -W option, use a comma as the separator for each option, and do not include any spaces. For the -X option, one space is needed before the option. If you need to include a character that is special to the shell in the option string, precede the character with a backslash. For example, if you use the -X or -W option in the configuration file, you can use the escape sequence backslash comma (\,) to represent a comma in the parameter string.
You do not need the -X or -W option to pass most options to the linker ld; unrecognized command-line options, except -q options, are passed to it automatically. Only linker options with the same letters as compiler options, such as -v or -S, strictly require -X or -W.
Predefined macros
None.
Examples
xlc -Xlinker -symbolic file.c
xlc -Xassembler -alh produces_warnings.s -Xlinker -s uses_many_symbols.c