Loading android/config.go +0 −4 Original line number Diff line number Diff line Loading @@ -1448,10 +1448,6 @@ func (c *deviceConfig) CurrentApiLevelForVendorModules() string { return StringDefault(c.config.productVariables.DeviceCurrentApiLevelForVendorModules, "current") } func (c *deviceConfig) PlatformVndkVersion() string { return String(c.config.productVariables.Platform_vndk_version) } func (c *deviceConfig) ExtraVndkVersions() []string { return c.config.productVariables.ExtraVndkVersions } Loading android/variable.go +0 −2 Original line number Diff line number Diff line Loading @@ -209,7 +209,6 @@ type ProductVariables struct { Platform_base_sdk_extension_version *int `json:",omitempty"` Platform_version_active_codenames []string `json:",omitempty"` Platform_version_all_preview_codenames []string `json:",omitempty"` Platform_vndk_version *string `json:",omitempty"` Platform_systemsdk_versions []string `json:",omitempty"` Platform_security_patch *string `json:",omitempty"` Platform_preview_sdk_version *string `json:",omitempty"` Loading Loading @@ -597,7 +596,6 @@ func (v *ProductVariables) SetDefaultConfig() { Platform_sdk_final: boolPtr(false), Platform_version_active_codenames: []string{"S"}, Platform_version_all_preview_codenames: []string{"S"}, Platform_vndk_version: stringPtr("S"), HostArch: stringPtr("x86_64"), HostSecondaryArch: stringPtr("x86"), Loading apex/apex.go +1 −7 Original line number Diff line number Diff line Loading @@ -739,7 +739,7 @@ func (a *apexBundle) combineProperties(ctx android.BottomUpMutatorContext) { // image variation name. func (a *apexBundle) getImageVariationPair(deviceConfig android.DeviceConfig) (string, string) { if a.vndkApex { return cc.VendorVariationPrefix, a.vndkVersion(deviceConfig) return cc.VendorVariationPrefix, a.vndkVersion() } prefix := android.CoreVariation Loading @@ -748,9 +748,6 @@ func (a *apexBundle) getImageVariationPair(deviceConfig android.DeviceConfig) (s if a.SocSpecific() || a.DeviceSpecific() { prefix = cc.VendorVariationPrefix vndkVersion = deviceConfig.VndkVersion() } else if a.ProductSpecific() { prefix = cc.ProductVariationPrefix vndkVersion = deviceConfig.PlatformVndkVersion() } } else { if a.SocSpecific() || a.DeviceSpecific() { Loading @@ -759,9 +756,6 @@ func (a *apexBundle) getImageVariationPair(deviceConfig android.DeviceConfig) (s prefix = cc.ProductVariation } } if vndkVersion == "current" { vndkVersion = deviceConfig.PlatformVndkVersion() } return prefix, vndkVersion } Loading apex/builder.go +2 −2 Original line number Diff line number Diff line Loading @@ -277,7 +277,7 @@ func (a *apexBundle) buildManifest(ctx android.ModuleContext, provideNativeLibs, // VNDK APEX name is determined at runtime, so update "name" in apex_manifest optCommands := []string{} if a.vndkApex { apexName := vndkApexNamePrefix + a.vndkVersion(ctx.DeviceConfig()) apexName := vndkApexNamePrefix + a.vndkVersion() optCommands = append(optCommands, "-v name "+apexName) } Loading Loading @@ -1043,7 +1043,7 @@ func (a *apexBundle) getOverrideManifestPackageName(ctx android.ModuleContext) s if a.vndkApex { overrideName, overridden := ctx.DeviceConfig().OverrideManifestPackageNameFor(vndkApexName) if overridden { return overrideName + ".v" + a.vndkVersion(ctx.DeviceConfig()) return overrideName + ".v" + a.vndkVersion() } return "" } Loading apex/vndk.go +7 −28 Original line number Diff line number Diff line Loading @@ -45,16 +45,12 @@ func vndkApexBundleFactory() android.Module { return bundle } func (a *apexBundle) vndkVersion(config android.DeviceConfig) string { vndkVersion := proptools.StringDefault(a.vndkProperties.Vndk_version, "current") if vndkVersion == "current" { vndkVersion = config.PlatformVndkVersion() } return vndkVersion func (a *apexBundle) vndkVersion() string { return proptools.StringDefault(a.vndkProperties.Vndk_version, "current") } type apexVndkProperties struct { // Indicates VNDK version of which this VNDK APEX bundles VNDK libs. Default is Platform VNDK Version. // Indicates VNDK version of which this VNDK APEX bundles VNDK libs. Vndk_version *string } Loading @@ -64,7 +60,7 @@ func apexVndkMutator(mctx android.TopDownMutatorContext) { mctx.PropertyErrorf("native_bridge_supported", "%q doesn't support native bridge binary.", mctx.ModuleType()) } vndkVersion := ab.vndkVersion(mctx.DeviceConfig()) vndkVersion := ab.vndkVersion() if vndkVersion != "" { apiLevel, err := android.ApiLevelFromUser(mctx, vndkVersion) if err != nil { Loading @@ -73,17 +69,9 @@ func apexVndkMutator(mctx android.TopDownMutatorContext) { } targets := mctx.MultiTargets() if len(targets) > 0 && apiLevel.LessThan(cc.MinApiForArch(mctx, targets[0].Arch.ArchType)) && vndkVersion != mctx.DeviceConfig().PlatformVndkVersion() { if len(targets) > 0 && apiLevel.LessThan(cc.MinApiForArch(mctx, targets[0].Arch.ArchType)) { // Disable VNDK APEXes for VNDK versions less than the minimum supported API // level for the primary architecture. This validation is skipped if the VNDK // version matches the platform VNDK version, which can occur when the device // config targets the 'current' VNDK (see `vndkVersion`). ab.Disable() } if proptools.String(ab.vndkProperties.Vndk_version) != "" && mctx.DeviceConfig().PlatformVndkVersion() != "" && apiLevel.GreaterThanOrEqualTo(android.ApiLevelOrPanic(mctx, mctx.DeviceConfig().PlatformVndkVersion())) { // level for the primary architecture. ab.Disable() } } Loading @@ -93,20 +81,11 @@ func apexVndkMutator(mctx android.TopDownMutatorContext) { func apexVndkDepsMutator(mctx android.BottomUpMutatorContext) { if m, ok := mctx.Module().(*cc.Module); ok && cc.IsForVndkApex(mctx, m) { vndkVersion := m.VndkVersion() // For VNDK-Lite device, we gather core-variants of VNDK-Sp libraries, which doesn't have VNDK version defined if vndkVersion == "" { vndkVersion = mctx.DeviceConfig().PlatformVndkVersion() } if vndkVersion == "" { return } if vndkVersion == mctx.DeviceConfig().PlatformVndkVersion() { vndkVersion = "current" } else { vndkVersion = "v" + vndkVersion } vndkApexName := "com.android.vndk." + vndkVersion Loading Loading
android/config.go +0 −4 Original line number Diff line number Diff line Loading @@ -1448,10 +1448,6 @@ func (c *deviceConfig) CurrentApiLevelForVendorModules() string { return StringDefault(c.config.productVariables.DeviceCurrentApiLevelForVendorModules, "current") } func (c *deviceConfig) PlatformVndkVersion() string { return String(c.config.productVariables.Platform_vndk_version) } func (c *deviceConfig) ExtraVndkVersions() []string { return c.config.productVariables.ExtraVndkVersions } Loading
android/variable.go +0 −2 Original line number Diff line number Diff line Loading @@ -209,7 +209,6 @@ type ProductVariables struct { Platform_base_sdk_extension_version *int `json:",omitempty"` Platform_version_active_codenames []string `json:",omitempty"` Platform_version_all_preview_codenames []string `json:",omitempty"` Platform_vndk_version *string `json:",omitempty"` Platform_systemsdk_versions []string `json:",omitempty"` Platform_security_patch *string `json:",omitempty"` Platform_preview_sdk_version *string `json:",omitempty"` Loading Loading @@ -597,7 +596,6 @@ func (v *ProductVariables) SetDefaultConfig() { Platform_sdk_final: boolPtr(false), Platform_version_active_codenames: []string{"S"}, Platform_version_all_preview_codenames: []string{"S"}, Platform_vndk_version: stringPtr("S"), HostArch: stringPtr("x86_64"), HostSecondaryArch: stringPtr("x86"), Loading
apex/apex.go +1 −7 Original line number Diff line number Diff line Loading @@ -739,7 +739,7 @@ func (a *apexBundle) combineProperties(ctx android.BottomUpMutatorContext) { // image variation name. func (a *apexBundle) getImageVariationPair(deviceConfig android.DeviceConfig) (string, string) { if a.vndkApex { return cc.VendorVariationPrefix, a.vndkVersion(deviceConfig) return cc.VendorVariationPrefix, a.vndkVersion() } prefix := android.CoreVariation Loading @@ -748,9 +748,6 @@ func (a *apexBundle) getImageVariationPair(deviceConfig android.DeviceConfig) (s if a.SocSpecific() || a.DeviceSpecific() { prefix = cc.VendorVariationPrefix vndkVersion = deviceConfig.VndkVersion() } else if a.ProductSpecific() { prefix = cc.ProductVariationPrefix vndkVersion = deviceConfig.PlatformVndkVersion() } } else { if a.SocSpecific() || a.DeviceSpecific() { Loading @@ -759,9 +756,6 @@ func (a *apexBundle) getImageVariationPair(deviceConfig android.DeviceConfig) (s prefix = cc.ProductVariation } } if vndkVersion == "current" { vndkVersion = deviceConfig.PlatformVndkVersion() } return prefix, vndkVersion } Loading
apex/builder.go +2 −2 Original line number Diff line number Diff line Loading @@ -277,7 +277,7 @@ func (a *apexBundle) buildManifest(ctx android.ModuleContext, provideNativeLibs, // VNDK APEX name is determined at runtime, so update "name" in apex_manifest optCommands := []string{} if a.vndkApex { apexName := vndkApexNamePrefix + a.vndkVersion(ctx.DeviceConfig()) apexName := vndkApexNamePrefix + a.vndkVersion() optCommands = append(optCommands, "-v name "+apexName) } Loading Loading @@ -1043,7 +1043,7 @@ func (a *apexBundle) getOverrideManifestPackageName(ctx android.ModuleContext) s if a.vndkApex { overrideName, overridden := ctx.DeviceConfig().OverrideManifestPackageNameFor(vndkApexName) if overridden { return overrideName + ".v" + a.vndkVersion(ctx.DeviceConfig()) return overrideName + ".v" + a.vndkVersion() } return "" } Loading
apex/vndk.go +7 −28 Original line number Diff line number Diff line Loading @@ -45,16 +45,12 @@ func vndkApexBundleFactory() android.Module { return bundle } func (a *apexBundle) vndkVersion(config android.DeviceConfig) string { vndkVersion := proptools.StringDefault(a.vndkProperties.Vndk_version, "current") if vndkVersion == "current" { vndkVersion = config.PlatformVndkVersion() } return vndkVersion func (a *apexBundle) vndkVersion() string { return proptools.StringDefault(a.vndkProperties.Vndk_version, "current") } type apexVndkProperties struct { // Indicates VNDK version of which this VNDK APEX bundles VNDK libs. Default is Platform VNDK Version. // Indicates VNDK version of which this VNDK APEX bundles VNDK libs. Vndk_version *string } Loading @@ -64,7 +60,7 @@ func apexVndkMutator(mctx android.TopDownMutatorContext) { mctx.PropertyErrorf("native_bridge_supported", "%q doesn't support native bridge binary.", mctx.ModuleType()) } vndkVersion := ab.vndkVersion(mctx.DeviceConfig()) vndkVersion := ab.vndkVersion() if vndkVersion != "" { apiLevel, err := android.ApiLevelFromUser(mctx, vndkVersion) if err != nil { Loading @@ -73,17 +69,9 @@ func apexVndkMutator(mctx android.TopDownMutatorContext) { } targets := mctx.MultiTargets() if len(targets) > 0 && apiLevel.LessThan(cc.MinApiForArch(mctx, targets[0].Arch.ArchType)) && vndkVersion != mctx.DeviceConfig().PlatformVndkVersion() { if len(targets) > 0 && apiLevel.LessThan(cc.MinApiForArch(mctx, targets[0].Arch.ArchType)) { // Disable VNDK APEXes for VNDK versions less than the minimum supported API // level for the primary architecture. This validation is skipped if the VNDK // version matches the platform VNDK version, which can occur when the device // config targets the 'current' VNDK (see `vndkVersion`). ab.Disable() } if proptools.String(ab.vndkProperties.Vndk_version) != "" && mctx.DeviceConfig().PlatformVndkVersion() != "" && apiLevel.GreaterThanOrEqualTo(android.ApiLevelOrPanic(mctx, mctx.DeviceConfig().PlatformVndkVersion())) { // level for the primary architecture. ab.Disable() } } Loading @@ -93,20 +81,11 @@ func apexVndkMutator(mctx android.TopDownMutatorContext) { func apexVndkDepsMutator(mctx android.BottomUpMutatorContext) { if m, ok := mctx.Module().(*cc.Module); ok && cc.IsForVndkApex(mctx, m) { vndkVersion := m.VndkVersion() // For VNDK-Lite device, we gather core-variants of VNDK-Sp libraries, which doesn't have VNDK version defined if vndkVersion == "" { vndkVersion = mctx.DeviceConfig().PlatformVndkVersion() } if vndkVersion == "" { return } if vndkVersion == mctx.DeviceConfig().PlatformVndkVersion() { vndkVersion = "current" } else { vndkVersion = "v" + vndkVersion } vndkApexName := "com.android.vndk." + vndkVersion Loading