Add cflags and tidy_checks to bpf_cc_defaults
Copied from netd_defaults
Test: m
Change-Id: I28fd3c6239c3abee4a53b6449d5b0c1e81c260b2
diff --git a/Android.bp b/Android.bp
index c4431d1..023ab6f 100644
--- a/Android.bp
+++ b/Android.bp
@@ -43,21 +43,39 @@
cflags: [
"-Wall",
"-Werror",
+ "-Werror=conditional-uninitialized",
+ "-Werror=implicit-fallthrough",
+ "-Werror=sometimes-uninitialized",
"-Wextra",
"-Wnullable-to-nonnull-conversion",
+ "-Wsign-compare",
"-Wtautological-unsigned-zero-compare",
"-Wthread-safety",
+ "-Wuninitialized",
"-Wunused-parameter",
],
tidy: true,
tidy_checks: [
"android-*",
+ "bugprone-*",
"cert-*",
"-cert-err34-c",
"clang-analyzer-security*",
// Many calls to snprintf/sscanf/memset/memcpy in libbpf.c have the following warning.
"-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling",
+ "google-*",
// Disabling due to many unavoidable warnings from POSIX API usage.
"-google-runtime-int",
+ "misc-*",
+ "performance-*",
+ ],
+ tidy_checks_as_errors: [
+ "android-*",
+ "bugprone-*",
+ "cert-*",
+ "clang-analyzer-security*",
+ "google-*",
+ "misc-*",
+ "performance-*",
],
}