Move local ldflags after the toolchain ldflags
This way a local module can override a global flag (like libm overriding -Wl,--hash-style=) Change-Id: If32774381fc46b5767f2c13bf45c3a84acb2697e
This commit is contained in:
4
cc/cc.go
4
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() {
|
||||
|
Reference in New Issue
Block a user