|CW(1ONBLD)||illumos Build Tools||CW(1ONBLD)|
cwis a facility for invoking one or more compilers, providing translation from Sun style arguments as appropriate. This allows the use of arbitrary compilers without the need to alter large numbers of makefiles. A mode called shadow compilation invokes multiple compilers so that warnings and errors may be obtained from all of them. See SHADOW COMPILATION for details. This version of cw supports compilers with both Sun Studio 12 and GCC-style command lines.
--shadowparameters take a compiler specification. This is a comma-separated list of the form name,executable,style Where name is a name for the compiler, executable is the full path to the compiler executable, and style is the style of command-line options the compiler expects, either sun or gnu.
-_style=Where name and style are those passed to
--shadowthis allows certain flags to be passed only to certain classes of compiler. For historical reasons, the
-_style=option is also translated such that a style of sun may use the flag
-_cc=and a style of gnu may use the flag
-_gcc=, and when the
-Coption is given and C++ is in use the style of sun may use the flag
-_CC=and the style of gnu may use the flag
--shadowcompilers are specified
cwwill invoke each shadow compiler, with the outputs modified (as well as any translation for compiler style) as follows:
-Sappears in the argument list (that is, linking is attempted or only the pre-processor is invoked), the shadow compilers will not be invoked.
-ofilename option was provided, with or without a separating space, it will be replaced with
-owas not provided,
-otempfile will be added to the end of the argument list used to invoke the shadow compilers.
cwwrites to standard error each compiler's standard error output following its argument list. Messages from the compilers will not be interleaved. If
cwis used to invoke the preprocessor and no output location is specified,
cwwill write to standard output the primary compiler's standard output. Because the Sun compilers write intermediate objects to fixed filenames in the current directory when instructed to compile and link multiple source files via a single command line, it would be unsafe to invoke more than one compiler in this fashion. Therefore
cwdoes not accept multiple source files unless the preprocessor is to be invoked. An attempt to invoke
cwin this manner will result in an error.
cw. See the comments at the head of usr/src/tools/cw/cw.c for a detailed list of translations.
|September 4, 2018||illumos|