Skip to content

Commit

Permalink
compat/nedmalloc: don't force NDEBUG on the rest of git
Browse files Browse the repository at this point in the history
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 <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
René Scharfe authored and Junio C Hamano committed Sep 11, 2010
1 parent 9904fad commit d555ff5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,7 @@ ifdef NO_REGEX
endif

ifdef USE_NED_ALLOCATOR
COMPAT_CFLAGS += -DUSE_NED_ALLOCATOR -DOVERRIDE_STRDUP -DNDEBUG -DREPLACE_SYSTEM_ALLOCATOR -Icompat/nedmalloc
COMPAT_CFLAGS += -Icompat/nedmalloc
COMPAT_OBJS += compat/nedmalloc/nedmalloc.o
endif

Expand Down Expand Up @@ -1879,6 +1879,11 @@ ifdef NO_EXPAT
http-walker.s http-walker.o: EXTRA_CPPFLAGS = -DNO_EXPAT
endif

ifdef USE_NED_ALLOCATOR
compat/nedmalloc/nedmalloc.o: EXTRA_CPPFLAGS = \
-DNDEBUG -DOVERRIDE_STRDUP -DREPLACE_SYSTEM_ALLOCATOR
endif

git-%$X: %.o $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)

Expand Down

0 comments on commit d555ff5

Please sign in to comment.