Merge "Add compile_multilib properties to all native prebuilts."

This commit is contained in:
Treehugger Robot
2020-07-15 02:51:21 +00:00
committed by Gerrit Code Review
4 changed files with 122 additions and 16 deletions

View File

@@ -794,6 +794,17 @@ func (s *snapshotBuilder) isInternalMember(memberName string) bool {
return !ok
}
// Add the properties from the given SdkMemberProperties to the blueprint
// property set. This handles common properties in SdkMemberPropertiesBase and
// calls the member-specific AddToPropertySet for the rest.
func addSdkMemberPropertiesToSet(ctx *memberContext, memberProperties android.SdkMemberProperties, targetPropertySet android.BpPropertySet) {
if memberProperties.Base().Compile_multilib != "" {
targetPropertySet.AddProperty("compile_multilib", memberProperties.Base().Compile_multilib)
}
memberProperties.AddToPropertySet(ctx, targetPropertySet)
}
type sdkMemberRef struct {
memberType android.SdkMemberType
variant android.SdkAware
@@ -1009,7 +1020,7 @@ func (osInfo *osTypeSpecificInfo) addToPropertySet(ctx *memberContext, bpModule
}
// Add the os specific but arch independent properties to the module.
osInfo.Properties.AddToPropertySet(ctx, osPropertySet)
addSdkMemberPropertiesToSet(ctx, osInfo.Properties, osPropertySet)
// Add arch (and possibly os) specific sections for each set of arch (and possibly
// os) specific properties.
@@ -1111,11 +1122,11 @@ func (archInfo *archTypeSpecificInfo) optimizeProperties(ctx *memberContext, com
func (archInfo *archTypeSpecificInfo) addToPropertySet(ctx *memberContext, archPropertySet android.BpPropertySet, archOsPrefix string) {
archTypeName := archInfo.archType.Name
archTypePropertySet := archPropertySet.AddPropertySet(archOsPrefix + archTypeName)
archInfo.Properties.AddToPropertySet(ctx, archTypePropertySet)
addSdkMemberPropertiesToSet(ctx, archInfo.Properties, archTypePropertySet)
for _, linkInfo := range archInfo.linkInfos {
linkPropertySet := archTypePropertySet.AddPropertySet(linkInfo.linkType)
linkInfo.Properties.AddToPropertySet(ctx, linkPropertySet)
addSdkMemberPropertiesToSet(ctx, linkInfo.Properties, linkPropertySet)
}
}
@@ -1221,7 +1232,7 @@ func (s *sdk) createMemberSnapshot(ctx *memberContext, member *sdkMember, bpModu
extractCommonProperties(ctx.sdkMemberContext, commonValueExtractor, commonProperties, osSpecificPropertiesContainers)
// Add the common properties to the module.
commonProperties.AddToPropertySet(ctx, bpModule)
addSdkMemberPropertiesToSet(ctx, commonProperties, bpModule)
// Create a target property set into which target specific properties can be
// added.