Merge "[cc_fuzz] Revert 'disable LTO' patches."
This commit is contained in:
commit
6c0de9938e
2 changed files with 0 additions and 18 deletions
|
@ -82,12 +82,6 @@ func (lto *lto) useClangLld(ctx BaseModuleContext) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (lto *lto) flags(ctx BaseModuleContext, flags Flags) Flags {
|
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.Local.CFlags) {
|
|
||||||
return flags
|
|
||||||
}
|
|
||||||
|
|
||||||
if lto.LTO(ctx) {
|
if lto.LTO(ctx) {
|
||||||
var ltoCFlag string
|
var ltoCFlag string
|
||||||
var ltoLdFlag string
|
var ltoLdFlag string
|
||||||
|
|
|
@ -541,12 +541,6 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) {
|
||||||
s.Address = nil
|
s.Address = nil
|
||||||
s.Thread = nil
|
s.Thread = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(b/131771163): CFI transiently depends on LTO, and thus Fuzzer is
|
|
||||||
// mutually incompatible.
|
|
||||||
if Bool(s.Fuzzer) {
|
|
||||||
s.Cfi = nil
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func toDisableImplicitIntegerChange(flags []string) bool {
|
func toDisableImplicitIntegerChange(flags []string) bool {
|
||||||
|
@ -641,12 +635,6 @@ func (sanitize *sanitize) flags(ctx ModuleContext, flags Flags) Flags {
|
||||||
if Bool(sanitize.Properties.Sanitize.Fuzzer) {
|
if Bool(sanitize.Properties.Sanitize.Fuzzer) {
|
||||||
flags.Local.CFlags = append(flags.Local.CFlags, "-fsanitize=fuzzer-no-link")
|
flags.Local.CFlags = append(flags.Local.CFlags, "-fsanitize=fuzzer-no-link")
|
||||||
|
|
||||||
// TODO(b/131771163): LTO and Fuzzer support is mutually incompatible.
|
|
||||||
_, flags.Local.LdFlags = removeFromList("-flto", flags.Local.LdFlags)
|
|
||||||
_, flags.Local.CFlags = removeFromList("-flto", flags.Local.CFlags)
|
|
||||||
flags.Local.LdFlags = append(flags.Local.LdFlags, "-fno-lto")
|
|
||||||
flags.Local.CFlags = append(flags.Local.CFlags, "-fno-lto")
|
|
||||||
|
|
||||||
// TODO(b/142430592): Upstream linker scripts for sanitizer runtime libraries
|
// TODO(b/142430592): Upstream linker scripts for sanitizer runtime libraries
|
||||||
// discard the sancov_lowest_stack symbol, because it's emulated TLS (and thus
|
// discard the sancov_lowest_stack symbol, because it's emulated TLS (and thus
|
||||||
// doesn't match the linker script due to the "__emutls_v." prefix).
|
// doesn't match the linker script due to the "__emutls_v." prefix).
|
||||||
|
|
Loading…
Reference in a new issue