From 19a5ec2f66016f8af4c12d3ee6e983ab48853662 Mon Sep 17 00:00:00 2001 From: Neill Kapron Date: Fri, 13 Sep 2024 16:32:28 +0000 Subject: [PATCH] BPF: rename bpf_defaults to bpf_cc_defaults With the addition of defaults to the bpf soong module (see aosp/3249485 ), the name `bpf_defaults` will be used to define defaults for bpf program compilation. While there are separate soong namespaces for module types and module names, rename the existing bpf_defaults cc_defaults to bpf_cc_defaults for clarity. While we're at it, add -Wextra, and cleanup unnecessary cflags in clauses which use bpf_cc_defaults. Test: TH Change-Id: Ia6e69a7ae447490ddc7bc3e08f2d07753bae0eac Signed-off-by: Neill Kapron --- Android.bp | 3 ++- loader/Android.bp | 13 ++----------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Android.bp b/Android.bp index b8cd7b3..9a17183 100644 --- a/Android.bp +++ b/Android.bp @@ -16,10 +16,11 @@ license { } cc_defaults { - name: "bpf_defaults", + name: "bpf_cc_defaults", cflags: [ "-Wall", "-Werror", + "-Wextra", "-Wnullable-to-nonnull-conversion", "-Wthread-safety", "-Wunused-parameter", diff --git a/loader/Android.bp b/loader/Android.bp index 4f66cdf..1e68f92 100644 --- a/loader/Android.bp +++ b/loader/Android.bp @@ -37,7 +37,6 @@ cc_library { }, }, }, - shared_libs: [ "libbase", "libutils", @@ -50,13 +49,7 @@ cc_library { "bpf_headers", ], export_include_dirs: ["include"], - - defaults: ["bpf_defaults"], - cflags: [ - "-Werror", - "-Wall", - "-Wextra", - ], + defaults: ["bpf_cc_defaults"], } rust_bindgen { @@ -88,10 +81,8 @@ cc_test { srcs: [ "BpfLoadTest.cpp", ], - defaults: ["bpf_defaults"], + defaults: ["bpf_cc_defaults"], cflags: [ - "-Wall", - "-Werror", "-Wno-error=unused-variable", ], static_libs: [