]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Makefile: force -O0 when compiling with SANITIZE=leak
authorJeff King <peff@peff.net>
Tue, 18 Oct 2022 20:15:33 +0000 (16:15 -0400)
committerJunio C Hamano <gitster@pobox.com>
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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)),)