aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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() {