From 74384758a63dfea76ed435feee306f4ad9a431ac Mon Sep 17 00:00:00 2001 From: Mitch Phillips Date: Mon, 17 Jun 2019 10:33:52 -0700 Subject: [PATCH] Remove experimental pass manager for fuzzer builds. Sanitizer coverage is currently broken with the experimental pass manager. See b/133876586 for more information. The patch is currently being worked on upstream (https://reviews.llvm.org/D62888), but is not ready yet. Hence, we disable it here (similar to the LTO bug). Bug: 133876586 Test: Build anything with SANITIZE_TARGET='fuzzer', verify that it has 'sancov' symbols. Change-Id: I4302a8cf05300015aaff137f40b61d5685dc3fea --- cc/sanitize.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cc/sanitize.go b/cc/sanitize.go index fdda7bec3..d594cc719 100644 --- a/cc/sanitize.go +++ b/cc/sanitize.go @@ -467,6 +467,10 @@ 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.LdFlags = append(flags.LdFlags, "-fno-lto") + + // TODO(b/133876586): Experimental PM breaks sanitizer coverage. + _, flags.CFlags = removeFromList("-fexperimental-new-pass-manager", flags.CFlags) + flags.CFlags = append(flags.CFlags, "-fno-experimental-new-pass-manager") } if Bool(sanitize.Properties.Sanitize.Cfi) {