git: d30dc78f798a - main - llvm BPF target: add missed source files

From: Dimitry Andric <>
Date: Tue, 02 Nov 2021 16:50:07 UTC
The branch main has been updated by dim:


commit d30dc78f798adebda488d2b8e21290268d2fb501
Author:     Dimitry Andric <>
AuthorDate: 2021-11-02 16:49:34 +0000
Commit:     Dimitry Andric <>
CommitDate: 2021-11-02 16:49:50 +0000

    llvm BPF target: add missed source files
    Otherwise, linking llvm binaries with this target enabled (which is not
    the default) will fail with a number of undefined symbol errors:
      ld: error: undefined symbol: llvm::initializeBPFAdjustOptPass(llvm::PassRegistry&)
      ld: error: undefined symbol: llvm::initializeBPFCheckAndAdjustIRPass(llvm::PassRegistry&)
      ld: error: undefined symbol: llvm::createBPFCheckAndAdjustIR()
      ld: error: undefined symbol: llvm::createBPFAdjustOpt()
      ld: error: undefined symbol: llvm::BPFAdjustOptPass::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&)
    Reported by:    Michael Dexter <>
    MFC after:      3 days
 lib/clang/libllvm/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/clang/libllvm/Makefile b/lib/clang/libllvm/Makefile
index bd0aee918ef3..43f6cfa9302d 100644
--- a/lib/clang/libllvm/Makefile
+++ b/lib/clang/libllvm/Makefile
@@ -1163,7 +1163,9 @@ SRCS_MIN+=	Target/ARM/Utils/ARMBaseInfo.cpp
 .if ${MK_LLVM_TARGET_BPF} != "no"
 SRCS_MIN+=	Target/BPF/AsmParser/BPFAsmParser.cpp
 SRCS_MIN+=	Target/BPF/BPFAbstractMemberAccess.cpp
+SRCS_MIN+=	Target/BPF/BPFAdjustOpt.cpp
 SRCS_MIN+=	Target/BPF/BPFAsmPrinter.cpp
+SRCS_MIN+=	Target/BPF/BPFCheckAndAdjustIR.cpp
 SRCS_MIN+=	Target/BPF/BPFFrameLowering.cpp
 SRCS_MIN+=	Target/BPF/BPFISelLowering.cpp