[LLVMdev] LLVM Cmake module?

Óscar Fuentes ofv at wanadoo.es
Thu Nov 4 09:17:28 PDT 2010


Eli Gottlieb <eligottlieb at gmail.com> writes:

>> So either you add the required C++ libraries yourself, or link the
>> shared library as a C++ executable.
>
> So... couldn't I just tell it to compile LLVM as shared libraries
> instead of static?

Yes, although that configuration is not as well tested as the static one.

(pass -DBUILD_SHARED_LIBS=ON to cmake before building LLVM. Be sure to
remove the LLVM files you previously installed before installing the new
build)

IMO linking your shared library as a C++ application is the easier path:

set_target_properties(your-shared-object PROPERTIES LINKER_LANGUAGE CXX)



More information about the llvm-dev mailing list