Add build define to manually enable -rdynamic LD flag
This commit is contained in:
+9
-2
@@ -40,8 +40,6 @@ CPPFLAGS+= -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(ZSTDDIR)/compress \
|
||||
-DXXH_NAMESPACE=ZSTD_
|
||||
ifeq ($(OS),Windows_NT) # MinGW assumed
|
||||
CPPFLAGS += -D__USE_MINGW_ANSI_STDIO # compatibility with %zu formatting
|
||||
else
|
||||
DEBUGFLAGS_LD+= -rdynamic # Enable backtrace symbol names for Linux/Darwin
|
||||
endif
|
||||
CFLAGS ?= -O3
|
||||
DEBUGFLAGS+=-Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \
|
||||
@@ -134,6 +132,15 @@ else
|
||||
LZ4_MSG := $(NO_LZ4_MSG)
|
||||
endif
|
||||
|
||||
# enable backtrace symbol names for Linux/Darwin
|
||||
ALL_SYMBOLS := 0
|
||||
ifeq (,$(filter Windows%, $(OS)))
|
||||
ifeq ($(ALL_SYMBOLS), 1)
|
||||
DEBUGFLAGS_LD+=-rdynamic
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
.PHONY: default
|
||||
default: zstd-release
|
||||
|
||||
|
||||
Reference in New Issue
Block a user