From d51048acdd02dd3d0913df1fdbd9af80cf64230f Mon Sep 17 00:00:00 2001 From: Mitch Phillips Date: Wed, 2 Mar 2022 01:25:22 +0000 Subject: [PATCH] Revert "[cc_fuzz] Revert 'disable LTO' patches." Revert "[cc_fuzz] Revert 'disable LTO' patches." Revert submission 1976512-revert-nolto-fuzzing Reason for revert: b/222160662 Reverted Changes: Iacee4fa29:[cc_fuzz] Revert 'disable LTO' patches. Ic509b00a1:[cc_fuzz] Revert 'disable LTO' patches. If85931f09:[cc_fuzz] Revert 'disable LTO' patches. Change-Id: I5f34731f0b7b27293636217f43d1cf5f17ab487b --- core/config_sanitizers.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk index 419dc6ea19..a0ff11951a 100644 --- a/core/config_sanitizers.mk +++ b/core/config_sanitizers.mk @@ -293,6 +293,12 @@ ifneq ($(filter fuzzer,$(my_sanitize)),) # information, not to link against the fuzzer main(). my_sanitize := $(filter-out fuzzer,$(my_sanitize)) my_sanitize += fuzzer-no-link + + # TODO(b/131771163): Disable LTO for fuzzer builds. Note that Cfi causes + # dependency on LTO. + my_sanitize := $(filter-out cfi,$(my_sanitize)) + my_cflags += -fno-lto + my_ldflags += -fno-lto endif ifneq ($(filter integer_overflow,$(my_sanitize)),)