diff options
-rw-r--r-- | common/arch.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/common/arch.go b/common/arch.go index 02212ade..830a2ce7 100644 --- a/common/arch.go +++ b/common/arch.go @@ -104,6 +104,8 @@ type archProperties struct { Target struct { Host interface{} Android interface{} + Android64 interface{} + Android32 interface{} Linux interface{} Darwin interface{} Windows interface{} @@ -404,6 +406,28 @@ func (a *AndroidModuleBase) setArchProperties(ctx blueprint.EarlyMutatorContext, reflect.ValueOf(a.archProperties[i].Target).FieldByName("Not_windows").Elem().Elem()) } + // Handle 64-bit device properties in the form: + // target { + // android64 { + // key: value, + // }, + // android32 { + // key: value, + // }, + // }, + // WARNING: this is probably not what you want to use in your blueprints file, it selects + // options for all targets on a device that supports 64-bit binaries, not just the targets + // that are being compiled for 64-bit. Its expected use case is binaries like linker and + // debuggerd that need to know when they are a 32-bit process running on a 64-bit device + if hod.Device() { + if true /* && target_is_64_bit */ { + extendProperties(ctx, "target", "android64", generalPropsValue, + reflect.ValueOf(a.archProperties[i].Target).FieldByName("Android64").Elem().Elem()) + } else { + extendProperties(ctx, "target", "android32", generalPropsValue, + reflect.ValueOf(a.archProperties[i].Target).FieldByName("Android32").Elem().Elem()) + } + } if ctx.Failed() { return } |