[llvm-commits] [llvm] r38486 - /llvm/trunk/Makefile.rules

Reid Spencer reid at x10sys.com
Tue Jul 10 00:19:55 PDT 2007


Author: reid
Date: Tue Jul 10 02:19:53 2007
New Revision: 38486

URL: http://llvm.org/viewvc/llvm-project?rev=38486&view=rev
Log:
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.

Modified:
    llvm/trunk/Makefile.rules

Modified: llvm/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=38486&r1=38485&r2=38486&view=diff

==============================================================================
--- llvm/trunk/Makefile.rules (original)
+++ llvm/trunk/Makefile.rules Tue Jul 10 02:19:53 2007
@@ -199,6 +199,7 @@
 # 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 @@
 # 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 @@
 # 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)





More information about the llvm-commits mailing list