]> 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)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 23 Mar 2023 08:17:23 +0000 (09:17 +0100)
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>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Makefile

index 5580859afdb45b44459798fa490f9b53e426079b..c4ad7595ed62b1e7ba533f9c2d0d6a6cb3773e10 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1268,6 +1268,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)),)