summaryrefslogtreecommitdiff
path: root/android/testing.go
diff options
context:
space:
mode:
author Neill Kapron <nkapron@google.com> 2024-07-31 22:17:36 +0000
committer Neill Kapron <nkapron@google.com> 2024-09-05 22:37:19 +0000
commit41efab77d0af29f95e29ad42f3471931b6373bea (patch)
tree8c5781dd471bd37d6d36c906018a76b34b102b33 /android/testing.go
parenta46053f612b79a66d836fa77d90a39ca8fcd2283 (diff)
SOONG: BPF: add libbpf_prog soong module
This commit adds the libbpf_prog soong module which is heavily based on the bpf soong module. Due to issues encountered and concerns around compatibility and testability of mainlined bpf modules, support for libbpf is added as a separate module. Specifically, when changing the bpf module from InitAndroidArchModule(... android.MultilibCommon) to MultilibFirst, the soong apex bpfs functionality breaks. We have not identified a good mechanism to fix this, and as we would then be creating architecture specific bpf program binarys, additional testing and infrastructure would be required. It should be noted that libbpf_prog should not be used for features which target 32bit kernel architectures at this point, as we do not have a mechanism to identify the kernel arch at build time. I.E. 32bit userspace could be on either 32bit or 64bit kernel arch, and we require arch specific includes (vmlinux.h). Therefore, we default to 32bit userspace on 64bit kernel to match the precedence set with the legacy bpf programs. Example use: libbpf_prog { name: "xyz.o", srcs: ["xyz.c"], arch: { arm: { local_include_dirs: ["vmlinux/arm64"], }, arm64: { local_include_dirs: ["vmlinux/arm64"], }, x86: { local_include_dirs: ["vmlinux/x86_64"], }, x86_64: { local_include_dirs: ["vmlinux/x86_64"], }, }, } Bug: 359646531 Test: manual Change-Id: Ie58515d70abee061470cf4bb803228e00d496ac3 Signed-off-by: Neill Kapron <nkapron@google.com>
Diffstat (limited to 'android/testing.go')
0 files changed, 0 insertions, 0 deletions