Allow CustomizeProperties to override linker am: 522e373a22

am: dca1ac1325

Change-Id: I68390fd7b226146f3484301e6084e9b046b99c1b
This commit is contained in:
Colin Cross
2016-09-07 21:18:13 +00:00
committed by android-build-merger

View File

@@ -37,6 +37,8 @@ type BinaryLinkerProperties struct {
// if set, install a symlink to the preferred architecture // if set, install a symlink to the preferred architecture
Symlink_preferred_arch bool Symlink_preferred_arch bool
DynamicLinker string `blueprint:"mutated"`
} }
func init() { func init() {
@@ -222,11 +224,15 @@ func (binary *binaryDecorator) linkerFlags(ctx ModuleContext, flags Flags) Flags
} else { } else {
if flags.DynamicLinker == "" { if flags.DynamicLinker == "" {
if binary.Properties.DynamicLinker != "" {
flags.DynamicLinker = binary.Properties.DynamicLinker
} else {
flags.DynamicLinker = "/system/bin/linker" flags.DynamicLinker = "/system/bin/linker"
if flags.Toolchain.Is64Bit() { if flags.Toolchain.Is64Bit() {
flags.DynamicLinker += "64" flags.DynamicLinker += "64"
} }
} }
}
flags.LdFlags = append(flags.LdFlags, flags.LdFlags = append(flags.LdFlags,
"-pie", "-pie",