diff --git a/include/vmlinux/Android.bp b/include/vmlinux/Android.bp index 345441e..0e4b4b3 100644 --- a/include/vmlinux/Android.bp +++ b/include/vmlinux/Android.bp @@ -107,3 +107,51 @@ cc_library_headers { }, }, } + +genrule { + name: "vmlinux_h_6_1_arm64", + cmd: "mkdir -p $(genDir)/6.1/arm64 && $(location bpftool) btf dump file $(location :vmlinux_6_1_arm64) format c > $(genDir)/6.1/arm64/vmlinux.h", + srcs: [ + ":vmlinux_6_1_arm64", + ], + tools: ["bpftool"], + out: [ + "6.1/arm64/vmlinux.h", + ], + export_include_dirs: ["6.1/arm64"], +} + +genrule { + name: "vmlinux_h_6_1_x86_64", + cmd: "mkdir -p $(genDir)/6.1/x86_64 && $(location bpftool) btf dump file $(location :vmlinux_6_1_x86_64) format c > $(genDir)/6.1/x86_64/vmlinux.h", + srcs: [ + ":vmlinux_6_1_x86_64", + ], + tools: ["bpftool"], + out: [ + "6.1/x86_64/vmlinux.h", + ], + export_include_dirs: ["6.1/x86_64"], +} + +cc_library_headers { + name: "vmlinux_h_6_1", + arch: { + arm: { + generated_headers: ["vmlinux_h_6_1_arm64"], + export_generated_headers: ["vmlinux_h_6_1_arm64"], + }, + arm64: { + generated_headers: ["vmlinux_h_6_1_arm64"], + export_generated_headers: ["vmlinux_h_6_1_arm64"], + }, + x86: { + generated_headers: ["vmlinux_h_6_1_x86_64"], + export_generated_headers: ["vmlinux_h_6_1_x86_64"], + }, + x86_64: { + generated_headers: ["vmlinux_h_6_1_x86_64"], + export_generated_headers: ["vmlinux_h_6_1_x86_64"], + }, + }, +}