Build/distcc for msvc

From MozillaWiki
Jump to: navigation, search

Status and notes page for distcc-for-msvc project at Seneca/Mozilla.

distcc

distcc is a development tool for *nix to share compiliations between multiple computers. This usually reduces compile time significantly. You can read more about it on distcc's official page. Our project is having it working for Microsoft's C/C++ compilier using Cygwin.

Documentation

Along with the documentation on distcc's website, we have compilied documentation from the source code using doxygen. You can find it here.

SVN

The source code is available from Seneca's CDOT website. You can checkout the source code anonymously at svn://cdot.senecac.on.ca/distcc

A snapshot has been released. The source code doesn't have cl functionality yet, but the code has been changed enough to allow cl, or any other C/C++ compiler to be used with distcc.

Requirements

As a reminder, the current requirements for this project is as follows (starting with the most obvious)
  1. Work with XP and perhaps Vista
  2. Work with Free Express C++ version of CL
  3. Focus on 32-bit x86 architecture
  4. Should not have to break GCC in order to add CL

Plan

Here is a freemind mindmap towards our goal[1] (click save as)
You can also view the svg file (may cause problems on some X installs).

Research

Cesar has looked into cl options and made a comparison of them to gcc options.
cl option gcc option Notes
/AI no gcc equivalent Directory to resolve file references (.dll, .exe. .obj)
/C -C or -CC (preserves comments in macros) preserves comments during preprocessing
/D -D Defines constants/macros
/E -E Sends preprocessor output to stdout
/EP -E Writes preprocessor output to stdout without #line directive (used to change the compiliers internally stored line number and file name)
/FI -include (not -I!) Causes the preprocesssor to process the header file (alternative to using the #include directive)
/FU no gcc equivelent alternative to using the #using directive
/I -I searches the directory for header files
/P --save-temps (but this saves all steps. Such as the preprocessor and assembly. So it should be -E --save-temps to limit it to preprocessed only) writes preprocessed files (same as /E) to a file with the same name with extension .i
/U /u -U undefines name (opposite of -D)
/X -nostdinc Ignores standard include paths

CL

#using directive and LoadLibrary

Because Mozilla calls the LoadLibrary() function rather than the using the #using directive, we've decided to provide support for LoadLibrary only. If anyone wants to add support for #using (which is a lot of work) feel free to do so.

Masquerade mode

Masquerading mode will only be available to gcc rather than cl to maintain backwards compatibility.

Environment variables

The current environment variables $DISTCC_HOSTS will remain but only be used for gcc volunteer machines. A new environment variable will be created to specify cl volunteer machines.