Remove dependencies on the 1-variant fallback
When adding a dependencies, if the variants don't match, but the
dependency only has 1 variant anyways, soong will always use that
variant. This makes it hard to add new variants to soong, because the
1-variant fallback stops being used and you start getting missing
variant errors. Make changes to bp files such that all dependencies
correctly specify the variant to use.
Bug: 372091092
Flag: EXEMPT refactor
Test: m nothing
Change-Id: Ia820b73e20525ff35c9a8bf8179eb63869857988
diff --git a/health/utils/libhealthloop/Android.bp b/health/utils/libhealthloop/Android.bp
index 4ebc575..08b3180 100644
--- a/health/utils/libhealthloop/Android.bp
+++ b/health/utils/libhealthloop/Android.bp
@@ -22,6 +22,12 @@
}
bpf {
+ name: "filterPowerSupplyEvents.o_non_vendor",
+ srcs: ["filterPowerSupplyEvents.c"],
+ visibility: ["//visibility:private"],
+}
+
+bpf {
name: "filterPowerSupplyEvents.o",
srcs: ["filterPowerSupplyEvents.c"],
// "vendor: true" because all binaries that use this BPF filter are vendor
@@ -55,10 +61,10 @@
],
}
-genrule {
+cc_genrule {
name: "filterPowerSupplyEvents.h",
out: ["filterPowerSupplyEvents.h"],
- srcs: [":filterPowerSupplyEvents.o"],
+ srcs: [":filterPowerSupplyEvents.o_non_vendor"],
cmd: "cat $(in) | od -v -tx1 | cut -c9- | grep -v '^$$' | sed 's/^/0x/;s/ /, 0x/g;s/^, //;s/$$/,/' > $(out)",
}
@@ -76,8 +82,10 @@
"libgmock",
],
generated_headers: [
- "filterPowerSupplyEvents.h",
"libbpf_headers",
],
+ device_first_generated_headers: [
+ "filterPowerSupplyEvents.h",
+ ],
compile_multilib: "64",
}
diff --git a/power/aidl/default/Android.bp b/power/aidl/default/Android.bp
index 4926b91..e934bc5 100644
--- a/power/aidl/default/Android.bp
+++ b/power/aidl/default/Android.bp
@@ -26,7 +26,7 @@
defaults: ["android.hardware.power-ndk_shared"],
relative_install_path: "hw",
init_rc: [":android.hardware.power.rc"],
- vintf_fragments: [":android.hardware.power.xml"],
+ vintf_fragments: ["power-default.xml"],
vendor: true,
shared_libs: [
"android.hardware.common-V2-ndk",
diff --git a/power/stats/aidl/default/Android.bp b/power/stats/aidl/default/Android.bp
index cc0fbf6..4c59d98 100644
--- a/power/stats/aidl/default/Android.bp
+++ b/power/stats/aidl/default/Android.bp
@@ -25,7 +25,7 @@
name: "android.hardware.power.stats-service.example",
relative_install_path: "hw",
init_rc: [":android.hardware.power.stats.rc"],
- vintf_fragments: [":android.hardware.power.stats.xml"],
+ vintf_fragments: ["power.stats-default.xml"],
vendor: true,
shared_libs: [
"libbase",
diff --git a/vibrator/aidl/default/Android.bp b/vibrator/aidl/default/Android.bp
index 0f342db..596c1a6 100644
--- a/vibrator/aidl/default/Android.bp
+++ b/vibrator/aidl/default/Android.bp
@@ -44,7 +44,7 @@
name: "android.hardware.vibrator-service.example",
relative_install_path: "hw",
init_rc: ["vibrator-default.rc"],
- vintf_fragments: [":android.hardware.vibrator.xml"],
+ vintf_fragments: ["android.hardware.vibrator.xml"],
vendor: true,
shared_libs: [
"libbase",