Change far dependency to regular in android_device
Far variation dependencies have an undesireable trait: they pick the
closest matching variant of a module if the variants don't match and
are unspecified. This means you could end up getting a wildly different
variant of the module if you don't specify any variants like we do here.
Instead, use a regular dependency which requires that the variants
match exactly. Some of the dependencies are multilib-first, so that
requires making the android_device module also multilib-first to match.
Test: m nothing
Change-Id: I16d9b36cf8fe401cf9034a8855430c399ce356d4
diff --git a/filesystem/android_device.go b/filesystem/android_device.go
index 0a7b701..fd8e915 100644
--- a/filesystem/android_device.go
+++ b/filesystem/android_device.go
@@ -61,7 +61,7 @@
func AndroidDeviceFactory() android.Module {
module := &androidDevice{}
module.AddProperties(&module.partitionProps)
- android.InitAndroidMultiTargetsArchModule(module, android.DeviceSupported, android.MultilibCommon)
+ android.InitAndroidMultiTargetsArchModule(module, android.DeviceSupported, android.MultilibFirst)
return module
}
@@ -74,7 +74,7 @@
func (a *androidDevice) DepsMutator(ctx android.BottomUpMutatorContext) {
addDependencyIfDefined := func(dep *string) {
if dep != nil {
- ctx.AddFarVariationDependencies(nil, filesystemDepTag, proptools.String(dep))
+ ctx.AddDependency(ctx.Module(), filesystemDepTag, proptools.String(dep))
}
}