Skip to content

Commit cb994d4

Browse files
committed
Fix build with shared libraries
/usr/bin/ld: CMakeFiles/ClangReplInterpreterTests.dir/InterpreterExtensi onsTest.cpp.o: undefined reference to symbol '_ZN4llvm14TargetRegistry12 lookupTargetENS_9StringRefERNSt7__cxx1112basic_stringIcSt11char_traitsIc ESaIcEEE' /usr/bin/ld: /work/kparzysz/git/llvm.org/b/x86/lib/libLLVMMC.so.19.0git: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status The missing symbol is `llvm::TargetRegistry::lookupTarget`, which interestingly enough is in MC. Add `MC` to the list of LLVM dependencies.
1 parent 930f646 commit cb994d4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clang/unittests/Interpreter/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
set(LLVM_LINK_COMPONENTS
22
${LLVM_TARGETS_TO_BUILD}
33
Core
4+
MC
45
OrcJIT
56
Support
67
TargetParser

0 commit comments

Comments
 (0)