[PATCH] D91940: [llvm-profgen] Fix shared-lib builds

Nathan Ridge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 22 16:57:14 PST 2020


nridge added a comment.

Without this change, a shared-libraries build of LLVM fails for me with the error:

  [1/126] Linking CXX executable bin/llvm-profgen
  FAILED: bin/llvm-profgen 
  : && /usr/bin/clang++-10 -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fuse-ld=gold     -Wl,-O3 -Wl,--gc-sections tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/llvm-profgen.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/PerfReader.cpp.o tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/ProfiledBinary.cpp.o -o bin/llvm-profgen  -Wl,-rpath,"\$ORIGIN/../lib"  lib/libLLVMX86Desc.so.12git  lib/libLLVMX86Disassembler.so.12git  lib/libLLVMMCDisassembler.so.12git  lib/libLLVMSymbolize.so.12git  -lpthread  lib/libLLVMObject.so.12git  lib/libLLVMCore.so.12git  lib/libLLVMMC.so.12git  lib/libLLVMSupport.so.12git  -Wl,-rpath-link,llvm/prod-build/lib && :
  tools/llvm-profgen/CMakeFiles/llvm-profgen.dir/llvm-profgen.cpp.o:llvm-profgen.cpp:function main: error: undefined reference to 'LLVMInitializeX86TargetInfo'
  clang: error: linker command failed with exit code 1 (use -v to see invocation)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91940



More information about the llvm-commits mailing list