Merge "Disable LTO when building with fuzzer support." am: df7d2cc9f8
am: cead9bad66
Change-Id: I2a20c069093dc67f65bedb5dca905c4706d8a163
This commit is contained in:
commit
35cabd5d34
2 changed files with 8 additions and 0 deletions
|
@ -80,6 +80,12 @@ func (lto *lto) useClangLld(ctx BaseModuleContext) bool {
|
|||
}
|
||||
|
||||
func (lto *lto) flags(ctx BaseModuleContext, flags Flags) Flags {
|
||||
// TODO(b/131771163): Disable LTO when using explicit fuzzing configurations.
|
||||
// LTO breaks fuzzer builds.
|
||||
if inList("-fsanitize=fuzzer-no-link", flags.CFlags) {
|
||||
return flags
|
||||
}
|
||||
|
||||
if lto.LTO() {
|
||||
var ltoFlag string
|
||||
if Bool(lto.Properties.Lto.Thin) {
|
||||
|
|
|
@ -465,7 +465,9 @@ func (sanitize *sanitize) flags(ctx ModuleContext, flags Flags) Flags {
|
|||
|
||||
// TODO(b/131771163): LTO and Fuzzer support is mutually incompatible.
|
||||
_, flags.LdFlags = removeFromList("-flto", flags.LdFlags)
|
||||
_, flags.CFlags = removeFromList("-flto", flags.CFlags)
|
||||
flags.LdFlags = append(flags.LdFlags, "-fno-lto")
|
||||
flags.CFlags = append(flags.CFlags, "-fno-lto")
|
||||
|
||||
// TODO(b/133876586): Experimental PM breaks sanitizer coverage.
|
||||
_, flags.CFlags = removeFromList("-fexperimental-new-pass-manager", flags.CFlags)
|
||||
|
|
Loading…
Reference in a new issue