diff options
author | Connor O'Brien <connoro@google.com> | 2022-02-14 17:49:38 -0800 |
---|---|---|
committer | Maciej Żenczykowski <maze@google.com> | 2022-02-18 01:01:36 +0000 |
commit | d8c2e9a027d264c571c2e27916f6de591f3f1d29 (patch) | |
tree | 0a18204d2a7d69d47554918e250e05cfa73ac3bf /Android.bp | |
parent | c2c9cd252800ede4a8572e6e9d72b67f6af0252d (diff) | |
download | bpftool-d8c2e9a027d264c571c2e27916f6de591f3f1d29.tar.gz |
Add Android.bp for bpftoolplatform-tools-33.0.1
Build bpftool for host so we can use it to generate BPF skeleton
headers when building libbpf-tools.
For now, set -DBPFTOOL_WITHOUT_SKELETONS to avoid a multi-step build
process involving an intermediate "bootstrap" bpftool used to embed
BPF skeletons in the bpftool binary itself to support newer features
not needed for this use case.
Test: m bpftool
Bug: 203823368
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: I8b4e2056dfb18761ac775819c30f9bd5f199db04
Diffstat (limited to 'Android.bp')
-rw-r--r-- | Android.bp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..78ac00a --- /dev/null +++ b/Android.bp @@ -0,0 +1,30 @@ + +cc_binary_host { + name: "bpftool", + srcs: [ + "src/*.c", + "src/kernel/bpf/disasm.c", + ], + exclude_srcs: [ + "src/jit_disasm.c", + ], + local_include_dirs: [ + "include", + "include/uapi", + "src/kernel/bpf" + ], + static_libs: [ + "libbpf", + "libcap", + "libelf", + "libz", + ], + cflags: [ + "-DBPFTOOL_WITHOUT_SKELETONS", + "-DBPFTOOL_VERSION=\"5.16.0-c446fdacb10d\"", + "-DUSE_LIBCAP", + "-Wno-missing-field-initializers", + "-Wno-pointer-arith", + "-Wno-unused-parameter", + ] +} |