[llvm] 74975d3 - BPF: Add LLVMAnalysis in CMakefile LINK_COMPONENTS

Yonghong Song via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 11 10:25:35 PST 2021


Author: Yonghong Song
Date: 2021-02-11T10:24:22-08:00
New Revision: 74975d35b47631da0c7911561f16d3ffd1af142a

URL: https://github.com/llvm/llvm-project/commit/74975d35b47631da0c7911561f16d3ffd1af142a
DIFF: https://github.com/llvm/llvm-project/commit/74975d35b47631da0c7911561f16d3ffd1af142a.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.

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


        


More information about the llvm-commits mailing list