summaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2010-10-22 12:54:34 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2010-10-22 12:54:34 +0000
commited50d3855345113cedbe6517d8801b3fe61a7d2b (patch)
treea12f4dd787e4c232467e8511f322d5cbefc0c9bb /Makefile.rules
parent9cf3b58ebbcb8eac5480a4ac1c2a774b9ced8a42 (diff)
downloadllvm-ed50d3855345113cedbe6517d8801b3fe61a7d2b.tar.gz
llvm-ed50d3855345113cedbe6517d8801b3fe61a7d2b.tar.bz2
llvm-ed50d3855345113cedbe6517d8801b3fe61a7d2b.tar.xz
Standardise all build-mode affecting {EN,DIS}ABLE_* make options to
test equality to 1, and fix/update documentation to reflect this git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117094 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules10
1 files changed, 5 insertions, 5 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 547eb2786e..d9645b6341 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -301,7 +301,7 @@ ifneq ($(REQUIRES_RTTI), 1)
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 @@ endif
# 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