Allow CustomizeProperties to override linker
Allow CustomizeProperties to override the dynamic linker by setting a DynamicLinker property. Needed by art, which overrides the linker for device-on-host testing. Change-Id: Ia4cb5a85b9a995d8138da33eb13543addf3b38cc
This commit is contained in:
parent
1e8ed27de3
commit
522e373a22
12
cc/binary.go
12
cc/binary.go
|
@ -37,6 +37,8 @@ type BinaryLinkerProperties struct {
|
|||
|
||||
// if set, install a symlink to the preferred architecture
|
||||
Symlink_preferred_arch bool
|
||||
|
||||
DynamicLinker string `blueprint:"mutated"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
@ -222,9 +224,13 @@ func (binary *binaryDecorator) linkerFlags(ctx ModuleContext, flags Flags) Flags
|
|||
|
||||
} else {
|
||||
if flags.DynamicLinker == "" {
|
||||
flags.DynamicLinker = "/system/bin/linker"
|
||||
if flags.Toolchain.Is64Bit() {
|
||||
flags.DynamicLinker += "64"
|
||||
if binary.Properties.DynamicLinker != "" {
|
||||
flags.DynamicLinker = binary.Properties.DynamicLinker
|
||||
} else {
|
||||
flags.DynamicLinker = "/system/bin/linker"
|
||||
if flags.Toolchain.Is64Bit() {
|
||||
flags.DynamicLinker += "64"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue