Passes the listed option to a designated compiler program.


Read syntax diagramSkip visual syntax diagram               .-----------.
               V           |
>>- -W--+-a-+----,--option-+-----------------------------------><

where programs are:

program Description
a Assembler
b Compiler back end
c Compiler front end
I Interprocedural analysis tool - compile phase
L Interprocedural analysis tool - link phase
m linkage helper
l linkage editor
p compiler preprocessor


By default, static objects are initialized in the order of priority specified by #pragma priority or the -qpriority option. You can use -Wm option to control the initialization order of the objects with the same priorities. Specifying -Wm -c instructs the compiler to initialize object files with the same priority in the order in which the files were given on the command line during linking into the library and the static objects within the files are initialized according to their declaration order.-Wm -r option, however, specifies that the object files with the same priority are to be initialized in the opposite order in which they were encountered during the linking phase.

When used in the configuration file, the -W option accepts the escape sequence backslash comma (\,) to represent a comma in the parameter string.


  1. To compile myprogram.c so that the option -pg is passed to the linkage editor (l) and the assembler (a), enter:
    xlc myprogram.c -Wl,-pg -Wa,-pg
  2. In a configuration file, use the \, sequence to represent the comma (,).

Related information