blob: 023ab6f13df7be27e0f8cb65c896e59f4961dddf [file] [log] [blame]
Bob Badourdcbf8ca2021-02-03 22:55:55 -08001package {
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
Neill Kapron432d1502024-09-17 18:48:23 +000018cc_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
Neill Kapron644d3362024-11-21 17:25:34 +000036cc_library_headers {
37 name: "android_bpf_defs",
38 export_include_dirs: ["include/defs"],
39}
40
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070041cc_defaults {
Neill Kapron19a5ec22024-09-13 16:32:28 +000042 name: "bpf_cc_defaults",
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070043 cflags: [
44 "-Wall",
45 "-Werror",
Motomu Utsumi588140f2025-03-21 11:10:29 +090046 "-Werror=conditional-uninitialized",
47 "-Werror=implicit-fallthrough",
48 "-Werror=sometimes-uninitialized",
Neill Kapron19a5ec22024-09-13 16:32:28 +000049 "-Wextra",
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070050 "-Wnullable-to-nonnull-conversion",
Motomu Utsumi588140f2025-03-21 11:10:29 +090051 "-Wsign-compare",
Motomu Utsumi6a162d72025-03-21 11:00:52 +090052 "-Wtautological-unsigned-zero-compare",
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070053 "-Wthread-safety",
Motomu Utsumi588140f2025-03-21 11:10:29 +090054 "-Wuninitialized",
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070055 "-Wunused-parameter",
56 ],
57 tidy: true,
58 tidy_checks: [
59 "android-*",
Motomu Utsumi588140f2025-03-21 11:10:29 +090060 "bugprone-*",
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070061 "cert-*",
Chenbo Feng1f20ad32018-11-26 15:18:46 -080062 "-cert-err34-c",
Chenbo Feng249e2f82018-11-20 17:37:00 -080063 "clang-analyzer-security*",
Chih-Hung Hsiehef3f44b2023-01-05 16:38:01 -080064 // Many calls to snprintf/sscanf/memset/memcpy in libbpf.c have the following warning.
65 "-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling",
Motomu Utsumi588140f2025-03-21 11:10:29 +090066 "google-*",
Bernie Innocentib2515ff2018-10-25 22:12:07 +090067 // Disabling due to many unavoidable warnings from POSIX API usage.
68 "-google-runtime-int",
Motomu Utsumi588140f2025-03-21 11:10:29 +090069 "misc-*",
70 "performance-*",
71 ],
72 tidy_checks_as_errors: [
73 "android-*",
74 "bugprone-*",
75 "cert-*",
76 "clang-analyzer-security*",
77 "google-*",
78 "misc-*",
79 "performance-*",
Chenbo Feng4c9e9ec2018-10-16 20:31:52 -070080 ],
81}