From 79ae341d4b44c8492ab31702cf16da470c80e38c Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 17 Apr 2020 15:49:49 -0700 Subject: [PATCH] Remove TARGET_PREFER_32_BIT support. Bug: https://issuetracker.google.com/138812821 Test: builds Change-Id: If96cccbd82ba1311165d61c947c928c6e7cd5593 --- android/arch.go | 2 +- android/config.go | 8 -------- android/variable.go | 4 ---- apex/apex.go | 3 --- cc/cc.go | 11 ++--------- java/app.go | 4 ---- sh/sh_binary.go | 3 --- 7 files changed, 3 insertions(+), 32 deletions(-) diff --git a/android/arch.go b/android/arch.go index 08c0256b7..80ac18aa1 100644 --- a/android/arch.go +++ b/android/arch.go @@ -810,7 +810,7 @@ func GetOsSpecificVariantsOfCommonOSVariant(mctx BaseModuleContext) []Module { // Valid multilib values include: // "both": compile for all Targets supported by the OsClass (generally x86_64 and x86, or arm64 and arm). // "first": compile for only a single preferred Target supported by the OsClass. This is generally x86_64 or arm64, -// but may be arm for a 32-bit only build or a build with TARGET_PREFER_32_BIT=true set. +// but may be arm for a 32-bit only build. // "32": compile for only a single 32-bit Target supported by the OsClass. // "64": compile for only a single 64-bit Target supported by the OsClass. // "common": compile a for a single Target that will work on all Targets suported by the OsClass (for example Java). diff --git a/android/config.go b/android/config.go index 59118ce86..675660ecb 100644 --- a/android/config.go +++ b/android/config.go @@ -732,14 +732,6 @@ func (c *config) Eng() bool { return Bool(c.productVariables.Eng) } -func (c *config) DevicePrefer32BitApps() bool { - return Bool(c.productVariables.DevicePrefer32BitApps) -} - -func (c *config) DevicePrefer32BitExecutables() bool { - return Bool(c.productVariables.DevicePrefer32BitExecutables) -} - func (c *config) DevicePrimaryArchType() ArchType { return c.Targets[Android][0].Arch.ArchType } diff --git a/android/variable.go b/android/variable.go index 3c08405dd..e025ae00c 100644 --- a/android/variable.go +++ b/android/variable.go @@ -272,10 +272,6 @@ type productVariables struct { CoveragePaths []string `json:",omitempty"` CoverageExcludePaths []string `json:",omitempty"` - DevicePrefer32BitApps *bool `json:",omitempty"` - DevicePrefer32BitExecutables *bool `json:",omitempty"` - HostPrefer32BitExecutables *bool `json:",omitempty"` - SanitizeHost []string `json:",omitempty"` SanitizeDevice []string `json:",omitempty"` SanitizeDeviceDiag []string `json:",omitempty"` diff --git a/apex/apex.go b/apex/apex.go index 2f7b2e535..d45dd6f0f 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -2280,9 +2280,6 @@ func newApexBundle() *apexBundle { module.AddProperties(&module.properties) module.AddProperties(&module.targetProperties) module.AddProperties(&module.overridableProperties) - module.Prefer32(func(ctx android.BaseModuleContext, base *android.ModuleBase, class android.OsClass) bool { - return class == android.Device && ctx.Config().DevicePrefer32BitExecutables() - }) android.InitAndroidMultiTargetsArchModule(module, android.HostAndDeviceSupported, android.MultilibCommon) android.InitDefaultableModule(module) android.InitSdkAwareModule(module) diff --git a/cc/cc.go b/cc/cc.go index 8eabff516..770391a8f 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -825,15 +825,8 @@ func (c *Module) Init() android.Module { } c.Prefer32(func(ctx android.BaseModuleContext, base *android.ModuleBase, class android.OsClass) bool { - switch class { - case android.Device: - return ctx.Config().DevicePrefer32BitExecutables() - case android.HostCross: - // Windows builds always prefer 32-bit - return true - default: - return false - } + // Windows builds always prefer 32-bit + return class == android.HostCross }) android.InitAndroidArchModule(c, c.hod, c.multilib) android.InitApexModule(c) diff --git a/java/app.go b/java/app.go index 24dde79f4..1b7785d0b 100755 --- a/java/app.go +++ b/java/app.go @@ -973,10 +973,6 @@ func AndroidAppFactory() android.Module { &module.overridableAppProperties, &module.usesLibrary.usesLibraryProperties) - module.Prefer32(func(ctx android.BaseModuleContext, base *android.ModuleBase, class android.OsClass) bool { - return class == android.Device && ctx.Config().DevicePrefer32BitApps() - }) - android.InitAndroidMultiTargetsArchModule(module, android.DeviceSupported, android.MultilibCommon) android.InitDefaultableModule(module) android.InitOverridableModule(module, &module.appProperties.Overrides) diff --git a/sh/sh_binary.go b/sh/sh_binary.go index 9276a62e9..4e45cd6ed 100644 --- a/sh/sh_binary.go +++ b/sh/sh_binary.go @@ -260,9 +260,6 @@ func InitShBinaryModule(s *ShBinary) { // executable binary to /bin. func ShBinaryFactory() android.Module { module := &ShBinary{} - module.Prefer32(func(ctx android.BaseModuleContext, base *android.ModuleBase, class android.OsClass) bool { - return class == android.Device && ctx.Config().DevicePrefer32BitExecutables() - }) InitShBinaryModule(module) android.InitAndroidArchModule(module, android.HostAndDeviceSupported, android.MultilibFirst) return module