xref: /aosp_15_r20/system/bpf/Android.bp (revision 55039e042b8390f50b0bdd70c11a2419f6d8fd50)
1package {
2    default_applicable_licenses: ["system_bpf_license"],
3}
4
5// Added automatically by a large-scale-change
6// http://go/android-license-faq
7license {
8    name: "system_bpf_license",
9    visibility: [":__subpackages__"],
10    license_kinds: [
11        "SPDX-license-identifier-Apache-2.0",
12    ],
13    license_text: [
14        "NOTICE",
15    ],
16}
17
18cc_library_headers {
19    name: "vmlinux15_6.6",
20    arch: {
21        arm: {
22            export_include_dirs: ["include/vmlinux/android15_6.6/arm64"],
23        },
24        arm64: {
25            export_include_dirs: ["include/vmlinux/android15_6.6/arm64"],
26        },
27        x86: {
28            export_include_dirs: ["include/vmlinux/android15_6.6/x86_64"],
29        },
30        x86_64: {
31            export_include_dirs: ["include/vmlinux/android15_6.6/x86_64"],
32        },
33    },
34}
35
36cc_library_headers {
37    name: "android_bpf_defs",
38    export_include_dirs: ["include/defs"],
39}
40
41cc_defaults {
42    name: "bpf_cc_defaults",
43    cflags: [
44        "-Wall",
45        "-Werror",
46        "-Wextra",
47        "-Wnullable-to-nonnull-conversion",
48        "-Wthread-safety",
49        "-Wunused-parameter",
50    ],
51    tidy: true,
52    tidy_checks: [
53        "android-*",
54        "cert-*",
55        "-cert-err34-c",
56        "clang-analyzer-security*",
57        // Many calls to snprintf/sscanf/memset/memcpy in libbpf.c have the following warning.
58        "-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling",
59        // Disabling due to many unavoidable warnings from POSIX API usage.
60        "-google-runtime-int",
61    ],
62}
63