[llvm-commits] [PATCH] Add MSVC multi processor compilation to build system

Óscar Fuentes ofv at wanadoo.es
Tue Mar 1 16:12:50 PST 2011


Erik Olofsson <Erik.Olofsson at hansoft.se> writes:

>> IMHO, we must have a very good reason for enabling by default a feature
>> that it is disabled by default on the build tool. If the user is expected to add
>> /MP to his project setting in case he wants multiprocessor builds, we
>> shouldn't do more.
>
> I think Microsoft leaves this off by default because it's incompatible
> with some other options. Those options are not used by llvm however. I
> think it would be useful when a developer compiles llvm on Microsoft
> compilers the compilation should be as fast as possible out of the
> box. If we leave this off by default most developers will not know
> about the option and will not benefit from the feature.

Which are those options? If they are used on the future, having /MP
active by default may create some inconveniences. Changing the default
value of option(VAR ...) has no effect if VAR already is on
CMakeCache.txt.

>> MSVC is true for all build tools that work with the MSVC compiler. AFAIK
>> /MP only works with MSBuild or whatever is used nowadays by the IDE.
>> Please use MSVC_IDE instead of MSVC.
>
> Ok will do. It won't break the build though as it's a compiler
> option. If the build tool doesn't provide several translation units in
> one invocation it will simply ignore the parameter.

It is a good thing to have a compiler's command line as clean as
possible.



More information about the llvm-commits mailing list