aboutsummaryrefslogtreecommitdiffstats
path: root/cc/linker.go
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2017-09-18 22:45:15 -0700
committerDan Willemsen <dwillemsen@google.com>2017-09-20 13:16:13 -0700
commit6f91fbff768a5822d7c5ef54a49192c513f301db (patch)
treedfff4e4d6aa1e1e53937ef6dfc8d191b46cc4584 /cc/linker.go
parent6eebec7414cb5940725c91bc03261c7de838b9e0 (diff)
downloadbuild_soong-6f91fbff768a5822d7c5ef54a49192c513f301db.tar.gz
build_soong-6f91fbff768a5822d7c5ef54a49192c513f301db.tar.bz2
build_soong-6f91fbff768a5822d7c5ef54a49192c513f301db.zip
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
Diffstat (limited to 'cc/linker.go')
-rw-r--r--cc/linker.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/cc/linker.go b/cc/linker.go
index 7c997d53..2a6c9098 100644
--- a/cc/linker.go
+++ b/cc/linker.go
@@ -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)
+ }
}
}