Make prefer32 a lambda
prefer32 needs to be set differently for app and native modules. Make it use lambda provided by the module type instead of trying to make archMutator figure it out. Test: m checkbuild Change-Id: Ibf8af35fdd3e1721725539d1f5452f4439d2125c
This commit is contained in:
11
cc/cc.go
11
cc/cc.go
@@ -406,6 +406,17 @@ func (c *Module) Init() android.Module {
|
||||
c.AddProperties(feature.props()...)
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
})
|
||||
android.InitAndroidArchModule(c, c.hod, c.multilib)
|
||||
|
||||
android.InitDefaultableModule(c)
|
||||
|
Reference in New Issue
Block a user