[LLVMdev] Linking to the LLVM shared library
ofv at wanadoo.es
Sun Aug 22 07:42:13 PDT 2010
nobled <nobled at dreamwidth.org> writes:
>> AFAIK, the `configure&make' build had so-so support for shared
>> libraries. Maybe that is fixed now. What they implemented recently was
>> one option for generating a single shared library containing all LLVM.
> Right, that was my original question--when you build libLLVM2.7.so
> with --enable-shared, LLVM's own tools link against it, but how do you
> link third-party sources against it (instead of the individual shared
> libs)? Is there an llvm-config option that will give the
> cflags/ldflags for that? (and if there isn't, would it be easy to add
> one for 2.8?)
If the library file name is libLLVM2.7.so just add -lLLVM2.7 instead
of the usual list of LLVM libraries to the link command.
More information about the llvm-dev