Add device_first_vendor(_shared)_data
There are some host tests in internal that rely on the vendor variation
of other modules, that they include in their `data` property.
Add explicit properties for these dependencies so that they don't rely
on the 1-variant fallback.
Bug: 372091092
Test: m nothing
Change-Id: I51a50db2a06fdd3f885ac21f3ad3ce15386feb53
diff --git a/android/path_properties.go b/android/path_properties.go
index b4fabeb..a79b5a2 100644
--- a/android/path_properties.go
+++ b/android/path_properties.go
@@ -52,12 +52,16 @@
var pathProperties []string
var pathDeviceFirstProperties []string
var pathDeviceFirstPrefer32Properties []string
+ var pathDeviceFirstVendorProperties []string
+ var pathDeviceFirstVendorSharedProperties []string
var pathDeviceCommonProperties []string
var pathCommonOsProperties []string
for _, ps := range props {
pathProperties = append(pathProperties, taggedPropertiesForPropertyStruct(ctx, ps, "path")...)
pathDeviceFirstProperties = append(pathDeviceFirstProperties, taggedPropertiesForPropertyStruct(ctx, ps, "path_device_first")...)
pathDeviceFirstPrefer32Properties = append(pathDeviceFirstPrefer32Properties, taggedPropertiesForPropertyStruct(ctx, ps, "path_device_first_prefer32")...)
+ pathDeviceFirstVendorProperties = append(pathDeviceFirstVendorProperties, taggedPropertiesForPropertyStruct(ctx, ps, "path_device_first_vendor")...)
+ pathDeviceFirstVendorSharedProperties = append(pathDeviceFirstVendorSharedProperties, taggedPropertiesForPropertyStruct(ctx, ps, "path_device_first_vendor_shared")...)
pathDeviceCommonProperties = append(pathDeviceCommonProperties, taggedPropertiesForPropertyStruct(ctx, ps, "path_device_common")...)
pathCommonOsProperties = append(pathCommonOsProperties, taggedPropertiesForPropertyStruct(ctx, ps, "path_common_os")...)
}
@@ -66,6 +70,8 @@
pathProperties = FirstUniqueStrings(pathProperties)
pathDeviceFirstProperties = FirstUniqueStrings(pathDeviceFirstProperties)
pathDeviceFirstPrefer32Properties = FirstUniqueStrings(pathDeviceFirstPrefer32Properties)
+ pathDeviceFirstVendorProperties = FirstUniqueStrings(pathDeviceFirstVendorProperties)
+ pathDeviceFirstVendorSharedProperties = FirstUniqueStrings(pathDeviceFirstVendorSharedProperties)
pathDeviceCommonProperties = FirstUniqueStrings(pathDeviceCommonProperties)
pathCommonOsProperties = FirstUniqueStrings(pathCommonOsProperties)
@@ -97,6 +103,23 @@
}
}
}
+ // path_device_first_vendor is path_device_first + vendor variation
+ deviceFirstVendorVariations := ctx.Config().AndroidFirstDeviceTarget.Variations()
+ deviceFirstVendorVariations = append(deviceFirstVendorVariations,
+ blueprint.Variation{Mutator: "image", Variation: "vendor"})
+ for _, s := range pathDeviceFirstVendorProperties {
+ if m, t := SrcIsModuleWithTag(s); m != "" {
+ ctx.AddVariationDependencies(deviceFirstVendorVariations, sourceOrOutputDepTag(m, t), m)
+ }
+ }
+ // path_device_first_vendor_shared is path_device_first_vendor + shared linkage variation
+ deviceFirstVendorSharedVariations := append(deviceFirstVendorVariations,
+ blueprint.Variation{Mutator: "link", Variation: "shared"})
+ for _, s := range pathDeviceFirstVendorSharedProperties {
+ if m, t := SrcIsModuleWithTag(s); m != "" {
+ ctx.AddVariationDependencies(deviceFirstVendorSharedVariations, sourceOrOutputDepTag(m, t), m)
+ }
+ }
// properties tagged "path_device_common" get the device common variant
for _, s := range pathDeviceCommonProperties {
if m, t := SrcIsModuleWithTag(s); m != "" {