diff --git a/android/config.go b/android/config.go index b7aac02df..b29012c1c 100644 --- a/android/config.go +++ b/android/config.go @@ -337,10 +337,6 @@ func (c *config) DevicePrefer32BitExecutables() bool { return Bool(c.ProductVariables.DevicePrefer32BitExecutables) } -func (c *config) HostPrefer32BitExecutables() bool { - return Bool(c.ProductVariables.HostPrefer32BitExecutables) -} - func (c *config) SkipDeviceInstall() bool { return c.EmbeddedInMake() || Bool(c.Mega_device) } diff --git a/cc/binary.go b/cc/binary.go index 38fc938f7..b6d66dd15 100644 --- a/cc/binary.go +++ b/cc/binary.go @@ -168,13 +168,11 @@ func (binary *binaryDecorator) linkerInit(ctx BaseModuleContext) { if binary.Properties.Stem == "" && binary.Properties.Suffix == "" { ctx.PropertyErrorf("symlink_preferred_arch", "must also specify stem or suffix") } - var prefer bool - if ctx.Host() { - prefer = ctx.AConfig().HostPrefer32BitExecutables() - } else { - prefer = ctx.AConfig().DevicePrefer32BitExecutables() + prefer32 := false + if ctx.Device() { + prefer32 = ctx.AConfig().DevicePrefer32BitExecutables() } - if ctx.PrimaryArch() != prefer { + if ctx.PrimaryArch() != prefer32 { binary.baseInstaller.Properties.Symlinks = append(binary.baseInstaller.Properties.Symlinks, ctx.ModuleName()) }