]> git.99rst.org Git - git.git/commitdiff
Makefile: force -O0 when compiling with SANITIZE=leak
authorJeff King <redacted>
Tue, 18 Oct 2022 20:15:33 +0000 (16:15 -0400)
committerJunio C Hamano <redacted>
Thu, 27 Oct 2022 22:12:22 +0000 (15:12 -0700)
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
Makefile

index cac3452edb90b473782ec0bda5782d133848d6ce..aa615fe4b61e2e9fc03929783af88a6dfe0f9893 100644 (file)
--- 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)),)
git clone https://git.99rst.org/PROJECT