代码拉取完成,页面将自动刷新
同步操作将从 src-anolis-os/bcc 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From bb121e49b1a05e86c88274a89f5229b4ec6939c6 Mon Sep 17 00:00:00 2001
From: Yonghong Song <yhs@fb.com>
Date: Tue, 25 May 2021 19:58:00 -0700
Subject: [PATCH 2/2] Fix a llvm compilation error
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Current llvm trunk (https://github.com/llvm/llvm-project)
will cause the following compilation errors:
/home/yhs/work/bcc/src/cc/bcc_debug.cc: In member function ‘void ebpf::SourceDebugger::dump()’:
/home/yhs/work/bcc/src/cc/bcc_debug.cc:135:75: error: no matching function for call to
‘llvm::MCContext::MCContext(llvm::Triple&, std::unique_ptr<llvm::MCAsmInfo>::pointer,
std::unique_ptr<llvm::MCRegisterInfo>::pointer, llvm::MCObjectFileInfo*,
std::unique_ptr<llvm::MCSubtargetInfo>::pointer, std::nullptr_t)’
MCContext Ctx(TheTriple, MAI.get(), MRI.get(), &MOFI, STI.get(), nullptr);
^
......
This is because upstream patch https://reviews.llvm.org/D101921
refactored MCObjectFileInfo initialization and changed MCContext
constructor signature.
This patch fixed the issue by following the new code patterns
in https://reviews.llvm.org/D101921.
---
src/cc/bcc_debug.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/cc/bcc_debug.cc b/src/cc/bcc_debug.cc
index 775c9141..97d6d95b 100644
--- a/src/cc/bcc_debug.cc
+++ b/src/cc/bcc_debug.cc
@@ -132,7 +132,8 @@ void SourceDebugger::dump() {
T->createMCSubtargetInfo(TripleStr, "", ""));
MCObjectFileInfo MOFI;
#if LLVM_MAJOR_VERSION >= 13
- MCContext Ctx(TheTriple, MAI.get(), MRI.get(), &MOFI, STI.get(), nullptr);
+ MCContext Ctx(TheTriple, MAI.get(), MRI.get(), STI.get(), nullptr);
+ Ctx.setObjectFileInfo(&MOFI);
MOFI.initMCObjectFileInfo(Ctx, false, false);
#else
MCContext Ctx(MAI.get(), MRI.get(), &MOFI, nullptr);
--
2.31.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。