Changes

Jump to: navigation, search

Distcc with MSVC:CL Options

1,825 bytes added, 23:46, 19 November 2006
Tutorial: Stupid CL being stupid and not unix
# some options require things that are only applicable if the entire local code base is around
# some options require you to send multiple files back (e.g. sending back .obj and .pdb objects is unsupported).
 
= Tutorial =
This tutorial is a quick way to check if a cl option is supported in distcc. You will have to follow these steps:
 
1. Open a cygwin bash shell, or the Visual Studio Command prompt<br />
2. Create a header file called '''sample.h''':
 
<pre>
#include <stdio.h>
#define GUARD 0
</pre>
 
3. Create a C file called '''sample.c''':
 
<pre>
#include "sample.h"
#include <string.h>
 
int main(void) {
return GUARD;
}
</pre>
 
4. Preprocess the file:
$> cl /P sample.c
 
5. create a temporary folder:
$> mkdir temp
 
6. Move the sample.c to temp:
$> mv sample.i temp/
or
move sample.i temp/
 
7. Rename the file sample.c:
$> mv sample.i sample.c
or
$> rename sample.i sample.c
 
8. Compile to '''object code''' and add a command line option listed below. For example:
$> cl /Fosample.obj /c sample.c ''/nologo''
 
9. If you get '''no object code''', '''an error''', or more than ''sample.obj'' being created, please document on this page, or if you feel really unsure, post in the discussion. When documenting please specify if your documentation comes from reading or doing. If reading is not from MSDN please link to where you got your information.
== Questionable Options ==
*/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).
*/c
*: only compile, don't link. (from doing)
*/doc
*: generate sone documentation in a xdc file. Killing this option since you can't get the file back from the slave.
*/errorReport
*/FC
*/H
*/HELP
*: You'd think this would cause problems but distcc leaves it be... OK!
*/hotpatch
*/J
1
edit

Navigation menu