Skip to content

Commit d555ff5

Browse files
René Scharfegitster
authored andcommitted
compat/nedmalloc: don't force NDEBUG on the rest of git
Define the nedmalloc feature configuration macros for nedmalloc.o, only. This keeps assert(3) working for the rest of the git source; it was turned off for nedmalloc users before by defining NDEBUG globally. Also remove -DUSE_NED_ALLOCATOR as this macro isn't used anywhere. Signed-off-by: Rene Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9904fad commit d555ff5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,7 @@ ifdef NO_REGEX
14481448
endif
14491449

14501450
ifdef USE_NED_ALLOCATOR
1451-
COMPAT_CFLAGS += -DUSE_NED_ALLOCATOR -DOVERRIDE_STRDUP -DNDEBUG -DREPLACE_SYSTEM_ALLOCATOR -Icompat/nedmalloc
1451+
COMPAT_CFLAGS += -Icompat/nedmalloc
14521452
COMPAT_OBJS += compat/nedmalloc/nedmalloc.o
14531453
endif
14541454

@@ -1879,6 +1879,11 @@ ifdef NO_EXPAT
18791879
http-walker.s http-walker.o: EXTRA_CPPFLAGS = -DNO_EXPAT
18801880
endif
18811881

1882+
ifdef USE_NED_ALLOCATOR
1883+
compat/nedmalloc/nedmalloc.o: EXTRA_CPPFLAGS = \
1884+
-DNDEBUG -DOVERRIDE_STRDUP -DREPLACE_SYSTEM_ALLOCATOR
1885+
endif
1886+
18821887
git-%$X: %.o $(GITLIBS)
18831888
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
18841889

0 commit comments

Comments
 (0)