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

Óscar Fuentes ofv at wanadoo.es
Wed Mar 2 09:59:02 PST 2011


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

>> Put everything in HandleLLVMOptions.cmake, so it can be used when Clang
>> is built using LLVM as an external library.
>
> Sorry, I just sent a patch that was split before I saw your message,
> please ignore it. A patch for only HandleLLVMOptions.cmake attached.

Committed as r126847. Thanks!

>> Certainly, there are superfluous tblgen dependencies, but accurately
>> determining them is tricky. About the dependencies between libraries,
>> there are some among LLVM targets and its subsidiaries (e.g. LLVMX86 and
>> LLVMX86AsmParser) and sometimes a dependency is declared from a library
>> into another when, actually, it should be on its tablegenned products (e.g.
>> LLVMX86 depending on LLVMTarget). In general, those cases can be easily
>> fixed, although I've seen cases of linker errors on Linux due to missing
>> vtables while linking the LLVM tools. If you know more instances of
>> unnecessary inter-library dependencies, please mention them.
>
> Actually LLVM looks pretty good, it's clang that has more
> dependencies. For example clangParse has a dependecy on clangLex.

Clang depedencies are manually maintained, which tends to produce
unnecesary references (as is the case for #include's on C++ sources.) I
hope to extend the LLVM automatic library dependency tool to Clang
someday.

>> Parallel builds work fine on Linux with make -jN, there is little room to
>> improve, but it seems that tablegenning on Windows is slow (in release
>> mode, if you are building on debug mode it can take a very long time. I
>> thought about always building tblgen.exe on release mode for avoiding
>> such excruciating build times.)
>
> I was building in Debug mode so tblgen in Release mode would probably
> help a lot,

I'm surprised to see how fast your debug builds are. Here, tblgen on
debug mode typically takes several minutes each time it is invoked.

> but one tblgen project includes to several tblgen, this
> gives room for improvement on msbuild where they are all run
> sequentially in each project.

This can be easily fixed by creating a custom_target for each tblgen
invocation.



More information about the llvm-commits mailing list