代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/bcc 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 2c200877c9325dee722f362cf97938a02e8b92e8 Mon Sep 17 00:00:00 2001
From: Yonghong Song <yhs@fb.com>
Date: Sun, 26 Mar 2023 13:10:49 -0700
Subject: [PATCH] Fix compilation error when built with llvm17
With llvm17, building bcc hits the following compilation errors:
...
/home/yhs/work/bcc/src/cc/bpf_module.cc:21:10: fatal error: llvm-c/Transforms/IPO.h: No such file or directory
21 | #include <llvm-c/Transforms/IPO.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/yhs/work/bcc/src/cc/bpf_module.cc:48:10: fatal error: llvm/Transforms/IPO/PassManagerBuilder.h: No such file or directory
48 | #include <llvm/Transforms/IPO/PassManagerBuilder.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The above two files are removed by https://reviews.llvm.org/D144970 and https://reviews.llvm.org/D145835
Signed-off-by: Yonghong Song <yhs@fb.com>
---
src/cc/bpf_module.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/cc/bpf_module.cc b/src/cc/bpf_module.cc
index 7b6f1af9..ffa703ca 100644
--- a/src/cc/bpf_module.cc
+++ b/src/cc/bpf_module.cc
@@ -17,7 +17,9 @@
#include <fcntl.h>
#include <linux/bpf.h>
+#if LLVM_MAJOR_VERSION <= 16
#include <llvm-c/Transforms/IPO.h>
+#endif
#include <llvm/ExecutionEngine/MCJIT.h>
#include <llvm/ExecutionEngine/SectionMemoryManager.h>
#if LLVM_MAJOR_VERSION >= 16
@@ -43,7 +45,9 @@
#include <llvm/Object/SymbolSize.h>
#include <llvm/Support/TargetSelect.h>
#include <llvm/Transforms/IPO.h>
+#if LLVM_MAJOR_VERSION <= 16
#include <llvm/Transforms/IPO/PassManagerBuilder.h>
+#endif
#include <net/if.h>
#include <sys/stat.h>
#include <unistd.h>
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。