Print this page
11461 should use a native link-editor during the build
11463 SUNWonld has passed its use-by date
11464 cmd/sgs/tools should contain tools, not common code
11465 sgsmsg should be built with the rest of the build tools
   1 CW(1ONBLD)                    illumos Build Tools                   CW(1ONBLD)
   2 
   3 NAME
   4      cw - invoke one or more compilers with argument translation
   5 
   6 SYNOPSIS
   7      cw [-C] [--versions] [--noecho] --primary compiler
   8         [--shadow compiler ...] -- compiler args ...
   9 
  10 DESCRIPTION
  11      cw is a facility for invoking one or more compilers, providing
  12      translation from Sun style arguments as appropriate.  This allows the use
  13      of arbitrary compilers without the need to alter large numbers of
  14      makefiles.  A mode called shadow compilation invokes multiple compilers
  15      so that warnings and errors may be obtained from all of them.  See SHADOW
  16      COMPILATION for details.  This version of cw supports compilers with both
  17      Sun Studio 12 and GCC-style command lines.
  18 
  19 ARGUMENTS
  20      Both the --primary and --shadow parameters take a compiler specification.
  21      This is a comma-separated list of the form name,executable,style Where
  22      name is a name for the compiler, executable is the full path to the
  23      compiler executable, and style is the style of command-line options the
  24      compiler expects, either sun or gnu.
  25 
  26      --primary compiler
  27              Specify the compiler to be used primarily (that which is used for
  28              link-editing and pre-processing, and whos objects we deliver).
  29 
  30      --shadow compiler
  31              Specify a shadow compiler, which builds sources for the sake of
  32              checking code quality and compatibility, but has its output
  33              discarded.
  34 




  35      --noecho
  36              Do not echo the actual command line of any compilers invoked.
  37 
  38      --versions
  39              Request from each configured primary and shadow compiler its
  40              version information.
  41 
  42      -C      The sources being compiled are C++.  This is necessary as it
  43              affects the translation of compiler arguments.
  44 
  45      --      Arguments intended for the compilers themselves must be separated
  46              from those of cw by a --.
  47 
  48      -_name=
  49 
  50      -_style=
  51              Parameters intended for the compiler be guarded with options of
  52              the form -_name= and -_style= Where name and style are those
  53              passed to --primary and --shadow this allows certain flags to be
  54              passed only to certain classes of compiler.


  98              If this variable is set in the environment, invoke the primary
  99              compiler, wait for it to complete, then invoke the shadow
 100              compilers.  Normally the primary and shadow compilers are invoked
 101              in parallel.
 102 
 103      CW_NO_EXEC
 104              f this variable is set in the environment, write the usual output
 105              to standard error but do not actually invoke any compiler.  This
 106              is useful for debugging the translation engine.
 107 
 108 EXIT STATUS
 109      The following exit status values are returned:
 110 
 111      0       The primary compiler, and shadow compilers if invoked, all
 112              completed successfully.
 113 
 114      >0           A usage error occurred, or one or more compilers returned a
 115              nonzero exit status.
 116 
 117 SEE ALSO
 118      cc(1), CC(1), gcc(1)
 119 
 120 BUGS
 121      The translations provided for gcc are not always exact and in some cases
 122      reflect local policy rather than actual equivalence.
 123 
 124      Additional compiler types should be supported.
 125 
 126      The translation engine is hacky.
 127 
 128 illumos                        September 4, 2018                       illumos
   1 CW(1ONBLD)                    illumos Build Tools                   CW(1ONBLD)
   2 
   3 NAME
   4      cw - invoke one or more compilers with argument translation
   5 
   6 SYNOPSIS
   7      cw [-C] [--versions] [--noecho] --primary compiler
   8         [--shadow compiler ...] [--linker linker] -- compiler args ...
   9 
  10 DESCRIPTION
  11      cw is a facility for invoking one or more compilers, providing
  12      translation from Sun style arguments as appropriate.  This allows the use
  13      of arbitrary compilers without the need to alter large numbers of
  14      makefiles.  A mode called shadow compilation invokes multiple compilers
  15      so that warnings and errors may be obtained from all of them.  See SHADOW
  16      COMPILATION for details.  This version of cw supports compilers with both
  17      Sun Studio 12 and GCC-style command lines.
  18 
  19 ARGUMENTS
  20      Both the --primary and --shadow parameters take a compiler specification.
  21      This is a comma-separated list of the form name,executable,style Where
  22      name is a name for the compiler, executable is the full path to the
  23      compiler executable, and style is the style of command-line options the
  24      compiler expects, either sun or gnu.
  25 
  26      --primary compiler
  27              Specify the compiler to be used primarily (that which is used for
  28              link-editing and pre-processing, and whos objects we deliver).
  29 
  30      --shadow compiler
  31              Specify a shadow compiler, which builds sources for the sake of
  32              checking code quality and compatibility, but has its output
  33              discarded.
  34 
  35      --linker linker
  36              Specify a link-editor to use in place of /usr/bin/ld.  ld(1)
  37              itself arranges for this to be executed by any subprocesses.
  38 
  39      --noecho
  40              Do not echo the actual command line of any compilers invoked.
  41 
  42      --versions
  43              Request from each configured primary and shadow compiler its
  44              version information.
  45 
  46      -C      The sources being compiled are C++.  This is necessary as it
  47              affects the translation of compiler arguments.
  48 
  49      --      Arguments intended for the compilers themselves must be separated
  50              from those of cw by a --.
  51 
  52      -_name=
  53 
  54      -_style=
  55              Parameters intended for the compiler be guarded with options of
  56              the form -_name= and -_style= Where name and style are those
  57              passed to --primary and --shadow this allows certain flags to be
  58              passed only to certain classes of compiler.


 102              If this variable is set in the environment, invoke the primary
 103              compiler, wait for it to complete, then invoke the shadow
 104              compilers.  Normally the primary and shadow compilers are invoked
 105              in parallel.
 106 
 107      CW_NO_EXEC
 108              f this variable is set in the environment, write the usual output
 109              to standard error but do not actually invoke any compiler.  This
 110              is useful for debugging the translation engine.
 111 
 112 EXIT STATUS
 113      The following exit status values are returned:
 114 
 115      0       The primary compiler, and shadow compilers if invoked, all
 116              completed successfully.
 117 
 118      >0           A usage error occurred, or one or more compilers returned a
 119              nonzero exit status.
 120 
 121 SEE ALSO
 122      cc(1), CC(1), gcc(1), ld(1)
 123 
 124 BUGS
 125      The translations provided for gcc are not always exact and in some cases
 126      reflect local policy rather than actual equivalence.
 127 
 128      Additional compiler types should be supported.
 129 
 130      The translation engine is hacky.
 131 
 132 illumos                        September 4, 2018                       illumos