[PATCH] D95727: llvm-shlib: Create object libraries for each component and link against them

Tom Stellard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 20 11:15:56 PDT 2021


tstellar added a comment.

In D95727#2783931 <https://reviews.llvm.org/D95727#2783931>, @MaskRay wrote:

> When Polly is in `LLVM_ENABLE_PROJECTS`, I get this
>
>   ld.lld: error: undefined symbol: getPollyPluginInfo()
>   >>> referenced by Extensions.cpp
>   >>>               lib/Extensions/CMakeFiles/obj.LLVMExtensions.dir/Extensions.cpp.o:(llvm::details::extensions_anchor())
>   >>> referenced by LTOBackend.cpp
>   >>>               lib/LTO/CMakeFiles/obj.LLVMLTO.dir/LTOBackend.cpp.o:(llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::vector<unsigned char, std::allocator<unsigned char> > const&))
>
> I find that in the linker command line all the `.o` files are linked without `--start-lib`. This means there will be no archive selection. Can this increase the output size?

Is --start-lib something specific to lld?   I did builds with binutils and libLLVM.so was the same size with and without this patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95727/new/

https://reviews.llvm.org/D95727



More information about the llvm-commits mailing list