mirror of
https://github.com/ip7z/7zip.git
synced 2026-01-01 06:10:03 +01:00
Add an option to create DEBUG build
This commit is contained in:
parent
5b39dc76f1
commit
19896c3515
|
|
@ -27,13 +27,22 @@ ifneq ($(CC), xlc)
|
|||
CFLAGS_WARN_WALL = -Werror -Wall -Wextra
|
||||
endif
|
||||
|
||||
ifdef DEBUG_BUILD
|
||||
CFLAGS_DEBUG = -g
|
||||
else
|
||||
CFLAGS_DEBUG = -DNDEBUG
|
||||
ifneq ($(CC), $(CROSS_COMPILE)clang)
|
||||
LFLAGS_STRIP = -s
|
||||
endif
|
||||
endif
|
||||
|
||||
# for object file
|
||||
# -Wa,-aln=test.s
|
||||
# -save-temps
|
||||
CFLAGS_BASE_LIST = -c
|
||||
# CFLAGS_BASE_LIST = -S
|
||||
CFLAGS_BASE = -O2 $(CFLAGS_BASE_LIST) $(CFLAGS_WARN_WALL) $(CFLAGS_WARN) \
|
||||
-DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
|
||||
$(CFLAGS_DEBUG) -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
|
||||
-fPIC
|
||||
|
||||
FLAGS_FLTO = -ffunction-sections
|
||||
|
|
@ -207,10 +216,6 @@ $(O):
|
|||
# LDFLAGS3= -Wl,--gc-sections
|
||||
# -Wl,--print-gc-sections
|
||||
|
||||
ifneq ($(CC), $(CROSS_COMPILE)clang)
|
||||
LFLAGS_STRIP = -s
|
||||
endif
|
||||
|
||||
LFLAGS_ALL = $(LFLAGS_STRIP) $(MY_ARCH_2) $(LDFLAGS) $(FLAGS_FLTO) $(LD_arch) $(OBJS) $(MY_LIBS) $(LIB2)
|
||||
|
||||
# -s : GCC : Remove all symbol table and relocation information from the executable.
|
||||
|
|
|
|||
Loading…
Reference in a new issue