diff options
-rw-r--r-- | build/Android.bp | 1 | ||||
-rw-r--r-- | build/art.go | 34 |
2 files changed, 20 insertions, 15 deletions
diff --git a/build/Android.bp b/build/Android.bp index 2c959d46f5..6766dd6033 100644 --- a/build/Android.bp +++ b/build/Android.bp @@ -4,6 +4,7 @@ bootstrap_go_package { deps: [ "blueprint", "blueprint-pathtools", + "blueprint-proptools", "soong", "soong-android", "soong-cc", diff --git a/build/art.go b/build/art.go index 452b3485a3..4e48d2d932 100644 --- a/build/art.go +++ b/build/art.go @@ -19,6 +19,8 @@ import ( "android/soong/cc" "fmt" "sync" + + "github.com/google/blueprint/proptools" ) var supportedArches = []string{"arm", "arm64", "mips", "mips64", "x86", "x86_64"} @@ -210,31 +212,33 @@ func debugDefaults(ctx android.LoadHookContext) { func customLinker(ctx android.LoadHookContext) { linker := envDefault(ctx, "CUSTOM_TARGET_LINKER", "") - if linker != "" { - type props struct { - DynamicLinker string - } + type props struct { + DynamicLinker string + } - p := &props{} + p := &props{} + if linker != "" { p.DynamicLinker = linker - ctx.AppendProperties(p) } + + ctx.AppendProperties(p) } func prefer32Bit(ctx android.LoadHookContext) { - if envTrue(ctx, "HOST_PREFER_32_BIT") { - type props struct { - Target struct { - Host struct { - Compile_multilib string - } + type props struct { + Target struct { + Host struct { + Compile_multilib *string } } + } - p := &props{} - p.Target.Host.Compile_multilib = "prefer32" - ctx.AppendProperties(p) + p := &props{} + if envTrue(ctx, "HOST_PREFER_32_BIT") { + p.Target.Host.Compile_multilib = proptools.StringPtr("prefer32") } + + ctx.AppendProperties(p) } func testMap(config android.Config) map[string][]string { |