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,8 +234,10 @@ func (linker *baseLinker) linkerFlags(ctx ModuleContext, flags Flags) Flags {
rpath_prefix = "@loader_path/"
}
for _, rpath := range linker.dynamicProperties.RunPaths {
flags.LdFlags = append(flags.LdFlags, "-Wl,-rpath,"+rpath_prefix+rpath)
if !ctx.static() {
for _, rpath := range linker.dynamicProperties.RunPaths {
flags.LdFlags = append(flags.LdFlags, "-Wl,-rpath,"+rpath_prefix+rpath)
}
}
}