@matheusbsbs / matheus-bagliano / commits / d555ff5482
Fork 0

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 <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>

René Scharfe committed Sep 11, 2010 at 11:59 UTC d555ff54820ade336d0d0f3900d62d5c09c0f63e
1 file changed +6 -1
Makefile
+6 -1
@@ -1448,7 +1448,7 @@ ifdef NO_REGEX
1448 endif
1449
1450 ifdef USE_NED_ALLOCATOR
1451 - COMPAT_CFLAGS += -DUSE_NED_ALLOCATOR -DOVERRIDE_STRDUP -DNDEBUG -DREPLACE_SYSTEM_ALLOCATOR -Icompat/nedmalloc
1451 + COMPAT_CFLAGS += -Icompat/nedmalloc
1452 COMPAT_OBJS += compat/nedmalloc/nedmalloc.o
1453 endif
1454
@@ -1879,6 +1879,11 @@ ifdef NO_EXPAT
1879 http-walker.s http-walker.o: EXTRA_CPPFLAGS = -DNO_EXPAT
1880 endif
1881
1882 +ifdef USE_NED_ALLOCATOR
1883 +compat/nedmalloc/nedmalloc.o: EXTRA_CPPFLAGS = \
1884 + -DNDEBUG -DOVERRIDE_STRDUP -DREPLACE_SYSTEM_ALLOCATOR
1885 +endif
1886 +
1887 git-%$X: %.o $(GITLIBS)
1888 $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
1889