Distcc with MSVC:CL Options

From CDOT Wiki
Revision as of 15:09, 10 November 2006 by Themystic (talk | contribs) (Tutorial: clarified tutorial reporting instructions.)
Jump to: navigation, search

CL Options

So you'd like to help with the Distcc With MSVC options.

Why CL Options Are Important

The way distcc works is that you send out source code to other machines (called slaves) for them to compile. This speeds up the compilation time. But how can the slave know how to compile this code that was sent to it? What happens is that distcc also sends the compile line to the slave. But it can't be the full line because:

  1. some options don't make sense for the compiler (e.g. options for the linker or the preprocessor).
  2. some options require things that are only applicable if the entire local code base is around
  3. some options require you to send multiple files back (e.g. sending back .obj and .pdb objects is unsupported).


This tutorial is a quick way to check if a cl option is supported in distcc. You will have to follow these steps.

  1. create a simple file. Try to #include some things like stdio.h and other .h files.
  2. preprocess the file. Use the /P for this, the file will be called <filename>.i
  3. move the file to some remote location. You can create a temporary folder for this.
  4. compile to object code. Pass the /Fo<filename>.obj /c to compile only to object code. If no object code or you get a warning, please give either document on this page or if you feel really unsure, post in the discussion.

Questionable Options

MSDN has categorical listing of cl options.

  • /arch
  • /bigobj
  • /clr
  • /EH
  • /favor
  • /fp
  • /G1
  • /G2
  • /Gd
  • /Ge
  • /GF
  • /Gh
  • /GH
  • /GL
  • /Gm
  • /GR
  • /Gr
  • /Gs
  • /GT
  • /GX
  • /Gy
  • /Gz
  • /MD
  • /MDd
  • /MT
  • /MTd
  • @
    lets you add a file with compiler options. This must be eliminated as the file can't be sent to the slave. (for reading)
  • /?
    You'd think this would cause problems but distcc leaves it be... OK! (from reading)
  • /analyze
    runs an analysis on the code and will bring up more warnings... This is ok, all it does is increase number of warning messages and may cause build to fail but the user did ask for it, so that's fine. (from reading).
  • /doc
  • /errorReport
  • /FC
  • /H
  • /HELP
    You'd think this would cause problems but distcc leaves it be... OK!
  • /hotpatch
  • /J
  • /nologo
  • /QIfist
  • /QIPF_B
  • /QIPF_C
  • /QIPF_fr32
  • /QIPF_noPIC
  • /QIPF_restrict_plabels
  • /showIncludes
  • /Tc/TC
  • /Tp/TP
  • /V
  • /W
  • /w
  • /Wall
  • /WL
  • /Zm