[LLVMdev] patches for the LLVM cmake build system

Óscar Fuentes ofv at wanadoo.es
Wed Mar 17 12:07:49 PDT 2010


Victor Zverovich <victor.zverovich at googlemail.com> writes:

>> > Attached are two patches for the LLVM cmake build system.
>> >
>> > The first one adds static runtimes (MT and MTd) to the list of
>> > runtimes for the MSVC build.
>>
>> This seems not to be as easy as you put it. It was discussed here
>> recently:
>>
>> From: José Fonseca
>> Subject: [PATCH]: MSVC build enhancements
>> Date: Sat, 6 Mar 2010 10:43:50 +0000
>>
>>
> I've read this thread but what I propose is simpler because this only allows
> the user to choose static runtime for all configurations (Debug, Release,
> MinSizeRel and RelWithDebInfo). I understand that it is not ideal because
> one would normally want MTd for Debug and MT for the rest but that's how it
> works now for MD as well. This patch doesn't try to solve this issue. But I
> don't see why static runtime options should be excluded as they are now. It
> only makes more difficult to build LLVM with a static runtime.

If I understand correctly the clarifications given by José on that
thread, adding the /MT flag is not enough. You must remove the /MD or
/MDd flags from whatever cmake variables where they can be present.

>> Interesting idea. But this method does not take into account the case
>> where the user does not build all libraries (i.e. ignores some LLVM
>> targets). On this scenario your method will take into account all
>> libraries, including those not built. IMO it is really needed to know
>> which LLVM libraries were built before resolving dependencies for client
>> projects, as it actually does for resolving dependencies for the LLVM
>> tools. I pretend to incorporate this information on a cmake file that is
>> installed along the rest of LLVM.
>>
>>
> I don't see what is the advantage for the user in the method you describe.
> In both cases the user will get an error when using library which was not
> built, right? Why not install LLVMLibDeps.cmake?

LLVMLibDeps.cmake will be installed. It is useful to know which
libraries are available. See tools/llc/CMakeLists.txt, for instance. It
uses ${LLVM_TARGETS_TO_BUILD} for building the llc tool with support for
all targets included on the LLVM build.




More information about the llvm-dev mailing list