Don't add a rpath to the linker

It doesn't need one, and doesn't handle it well either (it tries
allocating memory before the memory allocators are initialized).

Test: out/soong/host/linux_bionic-x86/bin/linker64
Change-Id: Ic4f75e8914093f13f28d53cf771f518f2b4e5d2e
This commit is contained in:
Dan Willemsen 2017-09-18 22:45:15 -07:00
parent 6eebec7414
commit 6f91fbff76
1 changed files with 4 additions and 2 deletions

View File

@ -234,10 +234,12 @@ func (linker *baseLinker) linkerFlags(ctx ModuleContext, flags Flags) Flags {
rpath_prefix = "@loader_path/"
}
if !ctx.static() {
for _, rpath := range linker.dynamicProperties.RunPaths {
flags.LdFlags = append(flags.LdFlags, "-Wl,-rpath,"+rpath_prefix+rpath)
}
}
}
if ctx.sdk() && (ctx.Arch().ArchType != android.Mips && ctx.Arch().ArchType != android.Mips64) {
// The bionic linker now has support gnu style hashes (which are much faster!), but shipping