Skip to content

Commit

Permalink
[llvm-extract] Don't forget to link to Analysis component
Browse files Browse the repository at this point in the history
```
[ 50% 1/2][ 50% 00:01 + 00:01] Linking CXX executable bin/llvm-extract
FAILED: bin/llvm-extract
: && /usr/bin/clang++-15 -O3 -g -ggdb -march=native -UNDEBUG -gsplit-dwarf -gz -fPIC -fno-semantic-interposition -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 -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -g -ggdb -march=native -UNDEBUG -gsplit-dwarf -gz -Wl,--gdb-index -Wl,--color-diagnostics     -Wl,--gc-sections tools/llvm-extract/CMakeFiles/llvm-extract.dir/llvm-extract.cpp.o -o bin/llvm-extract  -Wl,-rpath,"\$ORIGIN/../lib"  lib/libLLVMPasses.so.16git  lib/libLLVMIRPrinter.so.16git  lib/libLLVMipo.so.16git  lib/libLLVMBitWriter.so.16git  lib/libLLVMIRReader.so.16git  lib/libLLVMCore.so.16git  lib/libLLVMSupport.so.16git  -Wl,-rpath-link,/builddirs/llvm-project/build-Clang15/lib && :
ld: error: undefined symbol: llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>::AnalysisManager()
>>> referenced by llvm-extract.cpp:326 (/repositories/llvm-project/llvm/tools/llvm-extract/llvm-extract.cpp:326)
>>>               tools/llvm-extract/CMakeFiles/llvm-extract.dir/llvm-extract.cpp.o:(main)
>>> referenced by llvm-extract.cpp:373 (/repositories/llvm-project/llvm/tools/llvm-extract/llvm-extract.cpp:373)
>>>               tools/llvm-extract/CMakeFiles/llvm-extract.dir/llvm-extract.cpp.o:(main)
>>> referenced by llvm-extract.cpp:394 (/repositories/llvm-project/llvm/tools/llvm-extract/llvm-extract.cpp:394)
>>>               tools/llvm-extract/CMakeFiles/llvm-extract.dir/llvm-extract.cpp.o:(main)

ld: error: undefined symbol: llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>::AnalysisManager()
>>> referenced by llvm-extract.cpp:328 (/repositories/llvm-project/llvm/tools/llvm-extract/llvm-extract.cpp:328)
>>>               tools/llvm-extract/CMakeFiles/llvm-extract.dir/llvm-extract.cpp.o:(main)
>>> referenced by llvm-extract.cpp:375 (/repositories/llvm-project/llvm/tools/llvm-extract/llvm-extract.cpp:375)
>>>               tools/llvm-extract/CMakeFiles/llvm-extract.dir/llvm-extract.cpp.o:(main)
>>> referenced by llvm-extract.cpp:396 (/repositories/llvm-project/llvm/tools/llvm-extract/llvm-extract.cpp:396)
>>>               tools/llvm-extract/CMakeFiles/llvm-extract.dir/llvm-extract.cpp.o:(main)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
```
  • Loading branch information
LebedevRI authored and veselypeta committed Jun 10, 2024
2 parents bc17e8a + b2abbd1 commit 2dfbb38
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions llvm/tools/llvm-extract/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
set(LLVM_LINK_COMPONENTS
Analysis
BitWriter
Core
IPO
Expand Down

0 comments on commit 2dfbb38

Please sign in to comment.