[cfe-dev] clang windows: clang-cl support for /MP

Domagoj Saric domagoj.saric at littleendian.com
Wed May 20 05:47:53 PDT 2015


On 20.5.2015. 13:09, Kim Gräsman wrote:
> There are two levels of parallellization in Visual Studio/Visual C++;
>
> 1) Machine-wide setting of how many projects to build in parallel --
> this informs Visual Studio/MSBuild
> 2) Compiler setting (/MP) of how many source files to compile in
> parallel -- this actually informs CL.EXE and causes it to launch child
> processes
>
> See Bruce Dawson's treatise for the gory details:
> https://randomascii.wordpress.com/2014/03/22/make-vc-compiles-fast-through-parallel-compilation/
>
> Not sure how easy/desirable this behavior would be in clang-cl, but
> from a principal standpoint I'd prefer this kind of thing in the build
> system, not the compiler.

But from a 'practical standpoint', wouldn't a multithreaded compiler be the 
faster solution? e.g.:
  - you'd parse precompiled and/or shared headers only once for all the sources 
being compiled simultaneously/in-parallel
  - multithreaded LTO/LTCG 'for free'
  - threads are cheaper than processes


-- 
Domagoj Saric
Software Architect
www.LittleEndian.com





More information about the cfe-dev mailing list