From: Jeff King Date: Tue, 18 Oct 2022 20:15:33 +0000 (-0400) Subject: Makefile: force -O0 when compiling with SANITIZE=leak X-Git-Tag: v2.39.0-rc0~75^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=86fa96860b42d13dac3b1023817dfc177a91324c;p=thirdparty%2Fgit.git Makefile: force -O0 when compiling with SANITIZE=leak Cherry pick commit d3775de0 (Makefile: force -O0 when compiling with SANITIZE=leak, 2022-10-18), as otherwise the leak checker at GitHub Actions CI seems to fail with a false positive. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- diff --git a/Makefile b/Makefile index cac3452edb..aa615fe4b6 100644 --- a/Makefile +++ b/Makefile @@ -1338,6 +1338,7 @@ BASIC_CFLAGS += -DSHA1DC_FORCE_ALIGNED_ACCESS endif ifneq ($(filter leak,$(SANITIZERS)),) BASIC_CFLAGS += -DSUPPRESS_ANNOTATED_LEAKS +BASIC_CFLAGS += -O0 SANITIZE_LEAK = YesCompiledWithIt endif ifneq ($(filter address,$(SANITIZERS)),)