Remove dependencies on the 1-variant fallback
Currently, adding depedencies will use the only variant of a module
if only 1 variant exists. Otherwise, the variations of the two modules
+ the variations explicitly requested must match. The 1-variant
fallback causes issues for incremental soong, so remove reliances on it.
Bug: 372091092
Test: m nothing --no-skip-soong-tests
Change-Id: I4522a31603461dd613c93756a41ab5ec6c8989e6
diff --git a/build/soong/compat_cil.go b/build/soong/compat_cil.go
index fef2e69..d02d61e 100644
--- a/build/soong/compat_cil.go
+++ b/build/soong/compat_cil.go
@@ -119,7 +119,7 @@
func compatTestFactory() android.SingletonModule {
f := &compatTestModule{}
f.AddProperties(&f.properties)
- android.InitAndroidModule(f)
+ android.InitAndroidArchModule(f, android.DeviceSupported, android.MultilibCommon)
android.AddLoadHook(f, func(ctx android.LoadHookContext) {
f.loadHook(ctx)
})
diff --git a/build/soong/sepolicy_neverallow.go b/build/soong/sepolicy_neverallow.go
index 78cbc84..c2a21dd 100644
--- a/build/soong/sepolicy_neverallow.go
+++ b/build/soong/sepolicy_neverallow.go
@@ -57,7 +57,7 @@
func neverallowTestFactory() android.Module {
n := &neverallowTestModule{}
n.AddProperties(&n.properties)
- android.InitAndroidModule(n)
+ android.InitAndroidArchModule(n, android.DeviceSupported, android.MultilibCommon)
android.AddLoadHook(n, func(ctx android.LoadHookContext) {
n.loadHook(ctx)
})