diff options
| author | 2022-02-08 10:51:35 -0800 | |
|---|---|---|
| committer | 2022-02-08 10:51:35 -0800 | |
| commit | 7fbac74dc9365b25ce1f6fae11cccee2f42ce88d (patch) | |
| tree | 0053a24e900e559306bc33921e67c899c03bdfc4 | |
| parent | e95d77b9643ec4ffb1aae68e0cb76a846d4d2507 (diff) | |
[cc_fuzz] Revert 'disable LTO' patches.
The toolchain no longer has a problem with sancov + LTO.
Bug: 131771163
Test: make haiku
Change-Id: If85931f092c41336a8a5e0e7999ad39dd8ec3daf
| -rw-r--r-- | cc/lto.go | 6 | ||||
| -rw-r--r-- | cc/sanitize.go | 12 |
2 files changed, 0 insertions, 18 deletions
@@ -82,12 +82,6 @@ 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.Local.CFlags) { - return flags - } - if lto.LTO(ctx) { var ltoCFlag string var ltoLdFlag string diff --git a/cc/sanitize.go b/cc/sanitize.go index 6c6882217..9e047d5d1 100644 --- a/cc/sanitize.go +++ b/cc/sanitize.go @@ -540,12 +540,6 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) { s.Address = 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 { @@ -648,12 +642,6 @@ func (sanitize *sanitize) flags(ctx ModuleContext, flags Flags) Flags { if Bool(sanitize.Properties.Sanitize.Fuzzer) { 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 // 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). |