Don't add -lrt on Darwin for sanitized targets.
am: c6482d69c2
Change-Id: Ifdb10085e8ecb3e9fda394e59f46fca469826ab6
This commit is contained in:
commit
0fabe66321
1 changed files with 4 additions and 1 deletions
|
@ -351,7 +351,10 @@ func (sanitize *sanitize) flags(ctx ModuleContext, flags Flags) Flags {
|
||||||
if ctx.Host() {
|
if ctx.Host() {
|
||||||
flags.CFlags = append(flags.CFlags, "-fno-sanitize-recover=all")
|
flags.CFlags = append(flags.CFlags, "-fno-sanitize-recover=all")
|
||||||
flags.LdFlags = append(flags.LdFlags, sanitizeArg)
|
flags.LdFlags = append(flags.LdFlags, sanitizeArg)
|
||||||
flags.LdFlags = append(flags.LdFlags, "-lrt", "-ldl")
|
if ctx.Os() == android.Linux {
|
||||||
|
flags.LdFlags = append(flags.LdFlags, "-lrt")
|
||||||
|
}
|
||||||
|
flags.LdFlags = append(flags.LdFlags, "-ldl")
|
||||||
// Host sanitizers only link symbols in the final executable, so
|
// Host sanitizers only link symbols in the final executable, so
|
||||||
// there will always be undefined symbols in intermediate libraries.
|
// there will always be undefined symbols in intermediate libraries.
|
||||||
_, flags.LdFlags = removeFromList("-Wl,--no-undefined", flags.LdFlags)
|
_, flags.LdFlags = removeFromList("-Wl,--no-undefined", flags.LdFlags)
|
||||||
|
|
Loading…
Reference in a new issue