aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2016-05-11 01:27:50 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-05-11 01:27:50 +0000
commitac6697420aebc6e7f98d5a73c8d4c525bf8de419 (patch)
tree32519d0ef24afa15804ef9d118815c0d859300d6
parent8a35405d330ed9f69f6a34ca6d5e75ccc2c64540 (diff)
parent00ced7675cdc6b6512213c2772ea716283a6f433 (diff)
downloadbuild_soong-ac6697420aebc6e7f98d5a73c8d4c525bf8de419.tar.gz
build_soong-ac6697420aebc6e7f98d5a73c8d4c525bf8de419.tar.bz2
build_soong-ac6697420aebc6e7f98d5a73c8d4c525bf8de419.zip
Merge "Move local ldflags after the toolchain ldflags"
-rw-r--r--cc/cc.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cc/cc.go b/cc/cc.go
index a599bfb8..db2066ab 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1258,8 +1258,6 @@ func (linker *baseLinker) deps(ctx BaseModuleContext, deps Deps) Deps {
func (linker *baseLinker) flags(ctx ModuleContext, flags Flags) Flags {
toolchain := ctx.toolchain()
- flags.LdFlags = append(flags.LdFlags, linker.Properties.Ldflags...)
-
if !ctx.noDefaultCompilerFlags() {
if ctx.Device() && !Bool(linker.Properties.Allow_undefined_symbols) {
flags.LdFlags = append(flags.LdFlags, "-Wl,--no-undefined")
@@ -1276,6 +1274,8 @@ func (linker *baseLinker) flags(ctx ModuleContext, flags Flags) Flags {
}
}
+ flags.LdFlags = append(flags.LdFlags, linker.Properties.Ldflags...)
+
if ctx.Host() && !linker.static() {
rpath_prefix := `\$$ORIGIN/`
if ctx.Darwin() {