[cfe-dev] Linking a plugin against clang/LLVM libraries
Rafael EspĂndola
rafael.espindola at gmail.com
Tue Jan 20 13:24:22 PST 2015
> tools/driver/CMakeLists.txt in the clang repository sets LLVM_NO_DEAD_STRIP
> to 1 if CLANG_PLUGIN_SUPPORT is turned on, which it is in my build, but it
> seems like that setting does not affect libLLVMSupport, so we end up passing
> -dead_strip to the linker. I'm not sure if this is the intended behavior,
> or a bug.
>
I am not sure about ld64's -dead_strip, but at least for the ELF
equivalent (-gc-sections) the linker is supposed to keep symbols that
are in the symbol table of a library, so passing -gc-sections is safe.
Cheers,
Rafael
More information about the cfe-dev
mailing list