summaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-07-10 07:19:53 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-07-10 07:19:53 +0000
commit0a522b19e8fe8f06dc30919006feb7ba5ddad9af (patch)
tree5536fd7e71a147a5cab66111f892ea68bd102675 /Makefile.rules
parentaf825c840ebc4ca5248c62325b2371091c9fb4b4 (diff)
downloadllvm-0a522b19e8fe8f06dc30919006feb7ba5ddad9af.tar.gz
llvm-0a522b19e8fe8f06dc30919006feb7ba5ddad9af.tar.bz2
llvm-0a522b19e8fe8f06dc30919006feb7ba5ddad9af.tar.xz
Make sure that preprocessor symbols like _DEBUG, NDEBUG, and _GLIBC_DEBUG are
put into the CPP.Defines variable. Seems the convention was corrupted with various changes made. It is important to get command line parameters into the right variable because things like llvm-config and sub-makefiles depend on it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38486 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules9
1 files changed, 4 insertions, 5 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 74ee5b4e34..84c5eafc11 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -199,6 +199,7 @@ install-bytecode:: install-bytecode-local
# Variables derived from configuration we are building
#--------------------------------------------------------------------
+CPP.Defines :=
# OPTIMIZE_OPTION - The optimization level option we want to build LLVM with
# this can be overridden on the make command line.
ifneq ($(OS),MingW)
@@ -253,11 +254,9 @@ endif
# then disable assertions by defining the appropriate preprocessor symbols.
ifdef DISABLE_ASSERTIONS
BuildMode := $(BuildMode)-Asserts
- CXX.Flags += -DNDEBUG
- C.Flags += -DNDEBUG
+ CPP.Defines += -DNDEBUG
else
- CXX.Flags += -D_DEBUG
- C.Flags += -D_DEBUG
+ CPP.Defines += -D_DEBUG
endif
# If ENABLE_EXPENSIVE_CHECKS=1 is specified (make command line or
@@ -265,7 +264,7 @@ endif
# appropriate preprocessor symbols.
ifdef ENABLE_EXPENSIVE_CHECKS
BuildMode := $(BuildMode)+Checks
- CXX.Flags += -D_GLIBCXX_DEBUG
+ CPP.Defines += -D_GLIBCXX_DEBUG
endif
ifeq ($(ENABLE_PIC),1)