Skip to content

Commit 74975d3

Browse files
committed
BPF: Add LLVMAnalysis in CMakefile LINK_COMPONENTS
buildbot reported a build error like below: BPFTargetMachine.cpp:(.text._ZN4llvm19TargetTransformInfo5ModelINS_10BPFTTIImplEED2Ev [_ZN4llvm19TargetTransformInfo5ModelINS_10BPFTTIImplEED2Ev]+0x14): undefined reference to `llvm::TargetTransformInfo::Concept::~Concept()' lib/Target/BPF/CMakeFiles/LLVMBPFCodeGen.dir/BPFTargetMachine.cpp.o: In function `llvm::TargetTransformInfo::Model<llvm::BPFTTIImpl>::~Model()': Commit a260ae7 ("BPF: Implement TTI.IntImmCost() properly") added TargetTransformInfo to BPF, which requires LLVMAnalysis dependence. In certain cmake configurations, lacking explicit LLVMAnalysis dependency may cause compilation error. Similar to other targets, this patch added LLVMAnalysis in CMakefile LINK_COMPONENTS explicitly.
1 parent 606aa62 commit 74975d3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: llvm/lib/Target/BPF/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ add_llvm_target(BPFCodeGen
3535
BTFDebug.cpp
3636

3737
LINK_COMPONENTS
38+
Analysis
3839
AsmPrinter
3940
CodeGen
4041
Core

0 commit comments

Comments
 (0)