Do not use -Wl,--gc-sections for linux host libraries
This matches make Change-Id: I2ee2e47065439afa02b946ede3a7718f1a8dc71b
This commit is contained in:
parent
f534a10643
commit
99db8c30c1
1 changed files with 4 additions and 2 deletions
6
cc/cc.go
6
cc/cc.go
|
@ -1248,7 +1248,10 @@ func (c *CCLibrary) flags(ctx common.AndroidModuleContext, flags CCFlags) CCFlag
|
|||
sharedFlag = "-shared"
|
||||
}
|
||||
if ctx.Device() {
|
||||
flags.LdFlags = append(flags.LdFlags, "-nostdlib")
|
||||
flags.LdFlags = append(flags.LdFlags,
|
||||
"-nostdlib",
|
||||
"-Wl,--gc-sections",
|
||||
)
|
||||
}
|
||||
|
||||
if ctx.Darwin() {
|
||||
|
@ -1260,7 +1263,6 @@ func (c *CCLibrary) flags(ctx common.AndroidModuleContext, flags CCFlags) CCFlag
|
|||
)
|
||||
} else {
|
||||
flags.LdFlags = append(flags.LdFlags,
|
||||
"-Wl,--gc-sections",
|
||||
sharedFlag,
|
||||
"-Wl,-soname,"+libName+flags.Toolchain.ShlibSuffix(),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue