ANDROID: build libbpf for x86

x86 libbpf is a dependency for pahole, required for building pahole from
sources.

Bug: 477549297
Change-Id: Icd19ec89ab4bd5637bb82fb6262233e31dacf1e8
Signed-off-by: Siddharth Nayyar <sidnayyar@google.com>
This commit is contained in:
Siddharth Nayyar authored and Treehugger Robot committed 2026-03-12 08:18:00 -07:00
1 parent 883e4d055a
commit 7ce3ffaaef
1 file changed
+23
+23
View File
@@ -1276,6 +1276,29 @@ kernel_build(
visibility = ["//visibility:private"],
)
# libbpf
cc_library(
name = "bpf_x86",
srcs = glob([
"tools/arch/x86/include/**/*.h",
"tools/include/**/*.h",
"tools/lib/bpf/*.c",
]),
hdrs = glob([
"tools/lib/bpf/*.h",
]),
copts = [
"-I{}/tools/include".format(package_name()),
"-I{}/tools/lib/bpf".format(package_name()),
],
includes = [
"tools/include/uapi",
],
strip_include_prefix = "tools/lib",
visibility = ["//visibility:public"],
deps = ["//prebuilts/kernel-build-tools:imported_libs"],
)
# KUnit test targets
_KUNIT_DIR = "testcases/kunit"