Skip to content

Commit

Permalink
Makefile: force -O0 when compiling with SANITIZE=leak
Browse files Browse the repository at this point in the history
Cherry pick commit d3775de (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.

[Backported to v2.37.0 for easier merging e.g. into Git for Windows]

Signed-off-by: Jeff King <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
peff authored and derrickstolee committed Nov 8, 2022
1 parent 064bc3e commit cf052e5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1351,6 +1351,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)),)
Expand Down

0 comments on commit cf052e5

Please sign in to comment.