Author: Yonghong Song Date: 2021-05-03T16:48:10-07:00 New Revision: f9efff398c1159b15964b166368b232f562e6cfc
URL: https://github.com/llvm/llvm-project/commit/f9efff398c1159b15964b166368b232f562e6cfc DIFF: https://github.com/llvm/llvm-project/commit/f9efff398c1159b15964b166368b232f562e6cfc.diff LOG: 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 a260ae716030 ("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. (cherry picked from commit 74975d35b47631da0c7911561f16d3ffd1af142a) Added: Modified: llvm/lib/Target/BPF/CMakeLists.txt Removed: ################################################################################ diff --git a/llvm/lib/Target/BPF/CMakeLists.txt b/llvm/lib/Target/BPF/CMakeLists.txt index 24c6c5e1255e..189a3a84c3df 100644 --- a/llvm/lib/Target/BPF/CMakeLists.txt +++ b/llvm/lib/Target/BPF/CMakeLists.txt @@ -35,6 +35,7 @@ add_llvm_target(BPFCodeGen BTFDebug.cpp LINK_COMPONENTS + Analysis AsmPrinter CodeGen Core _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits