Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions src/posix.mak
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,11 @@ ifeq ($(CXX_KIND), clang++)
CXXFLAGS += \
-xc++
endif
DFLAGS := -version=MARS $(PIC)

DFLAGS=
override DFLAGS += -version=MARS $(PIC)
# Enable D warnings
DFLAGS += -w -de
override DFLAGS += -w -de

ifneq (,$(DEBUG))
ENABLE_DEBUG := 1
Expand All @@ -235,11 +237,11 @@ endif
# Append different flags for debugging, profiling and release.
ifdef ENABLE_DEBUG
CXXFLAGS += -g -g3 -DDEBUG=1 -DUNITTEST
DFLAGS += -g -debug
override DFLAGS += -g -debug
endif
ifdef ENABLE_RELEASE
CXXFLAGS += -O2
DFLAGS += -O -release -inline
override DFLAGS += -O -release -inline
endif
ifdef ENABLE_PROFILING
CXXFLAGS += -pg -fprofile-arcs -ftest-coverage
Expand All @@ -254,13 +256,13 @@ ifdef ENABLE_LTO
CXXFLAGS += -flto
endif
ifdef ENABLE_UNITTEST
DFLAGS += -unittest -cov
override DFLAGS += -unittest -cov
endif
ifdef ENABLE_PROFILE
DFLAGS += -profile
override DFLAGS += -profile
endif
ifdef ENABLE_COVERAGE
DFLAGS += -cov -L-lgcov
override DFLAGS += -cov -L-lgcov
CXXFLAGS += --coverage
endif
ifdef ENABLE_SANITIZERS
Expand All @@ -270,7 +272,7 @@ ifeq ($(HOST_DMD_KIND), dmd)
HOST_CXX += -fsanitize=${ENABLE_SANITIZERS}
endif
ifneq (,$(findstring gdc,$(HOST_DMD_KIND))$(findstring ldc,$(HOST_DMD_KIND)))
DFLAGS += -fsanitize=${ENABLE_SANITIZERS}
override DFLAGS += -fsanitize=${ENABLE_SANITIZERS}
endif

endif
Expand Down