[llvm-commits] [llvm] r117094 - in /llvm/trunk: Makefile.rules docs/MakefileGuide.html

Peter Collingbourne peter at pcc.me.uk
Fri Oct 22 05:54:35 PDT 2010


Author: pcc
Date: Fri Oct 22 07:54:34 2010
New Revision: 117094

URL: http://llvm.org/viewvc/llvm-project?rev=117094&view=rev
Log:
Standardise all build-mode affecting {EN,DIS}ABLE_* make options to
test equality to 1, and fix/update documentation to reflect this

Modified:
    llvm/trunk/Makefile.rules
    llvm/trunk/docs/MakefileGuide.html

Modified: llvm/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=117094&r1=117093&r2=117094&view=diff
==============================================================================
--- llvm/trunk/Makefile.rules (original)
+++ llvm/trunk/Makefile.rules Fri Oct 22 07:54:34 2010
@@ -301,7 +301,7 @@
   CXX.Flags += -fno-rtti
 endif
 
-ifdef ENABLE_COVERAGE
+ifeq ($(ENABLE_COVERAGE),1)
   BuildMode := $(BuildMode)+Coverage
   CXX.Flags += -ftest-coverage -fprofile-arcs
   C.Flags   += -ftest-coverage -fprofile-arcs
@@ -309,17 +309,17 @@
 
 # If DISABLE_ASSERTIONS=1 is specified (make command line or configured),
 # then disable assertions by defining the appropriate preprocessor symbols.
-ifndef DISABLE_ASSERTIONS
+ifeq ($(DISABLE_ASSERTIONS),1)
+  CPP.Defines += -DNDEBUG
+else
   BuildMode := $(BuildMode)+Asserts
   CPP.Defines += -D_DEBUG
-else
-  CPP.Defines += -DNDEBUG
 endif
 
 # If ENABLE_EXPENSIVE_CHECKS=1 is specified (make command line or
 # configured), then enable expensive checks by defining the
 # appropriate preprocessor symbols.
-ifdef ENABLE_EXPENSIVE_CHECKS
+ifeq ($(ENABLE_EXPENSIVE_CHECKS),1)
   BuildMode := $(BuildMode)+Checks
   CPP.Defines += -D_GLIBCXX_DEBUG -DXDEBUG
 endif

Modified: llvm/trunk/docs/MakefileGuide.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/MakefileGuide.html?rev=117094&r1=117093&r2=117094&view=diff
==============================================================================
--- llvm/trunk/docs/MakefileGuide.html (original)
+++ llvm/trunk/docs/MakefileGuide.html Fri Oct 22 07:54:34 2010
@@ -640,18 +640,18 @@
     generate dependencies when running the compiler. Use of this feature is
     discouraged and it may be removed at a later date.</dd>
     <dt><a name="ENABLE_OPTIMIZED"><tt>ENABLE_OPTIMIZED</tt></a></dt>
-    <dd>If set to any value, causes the build to generate optimized objects,
+    <dd>If set to 1, causes the build to generate optimized objects,
     libraries and executables. This alters the flags specified to the compilers
     and linkers. Generally debugging won't be a fun experience with an optimized
     build.</dd>
     <dt><a name="ENABLE_PROFILING"><tt>ENABLE_PROFILING</tt></a></dt>
-    <dd>If set to any value, causes the build to generate both optimized and 
+    <dd>If set to 1, causes the build to generate both optimized and 
     profiled objects, libraries and executables. This alters the flags specified
     to the compilers and linkers to ensure that profile data can be collected
     from the tools built. Use the <tt>gprof</tt> tool to analyze the output from
     the profiled tools (<tt>gmon.out</tt>).</dd>
     <dt><a name="DISABLE_ASSERTIONS"><tt>DISABLE_ASSERTIONS</tt></a></dt>
-    <dd>If set to any value, causes the build to disable assertions, even if 
+    <dd>If set to 1, causes the build to disable assertions, even if 
     building a debug or profile build.  This will exclude all assertion check
     code from the build. LLVM will execute faster, but with little help when
     things go wrong.</dd>





More information about the llvm-commits mailing list