Details
Details
- Reviewers
wlei
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Event Timeline
Comment Actions
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)
Comment Actions
@nridge, did you try rebase to apply this https://github.com/llvm/llvm-project/commit/dcc06597b1d61d35c7246d3ab2d7a807134aaa45 ?
If AllTargetsInfos includes X86Info, then we no need this change, thanks.
Comment Actions
You're right, the change to add AllTargetsInfos already fixed this. I will abandon this patch.