summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDon Hinton <hintonda@gmail.com>2017-09-27 21:19:56 +0000
committerDon Hinton <hintonda@gmail.com>2017-09-27 21:19:56 +0000
commitde9cae20fec1a040893adc9b29d47fee3c7272d7 (patch)
tree886ce7dbe5889996c5e441b225920db2e5273ec1 /CMakeLists.txt
parentde8eb76ebd7a32e09c8d416996d468d88707ca3e (diff)
Cleanup some problems with LLVM_ENABLE_DUMP in release builds, and
always set LLVM_ENABLE_DUMP=ON for +Asserts builds. Differential Revision: https://reviews.llvm.org/D38306 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314346 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b5454499df3..410c6afa17e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -388,15 +388,19 @@ option(LLVM_ENABLE_LLD "Use lld as C and C++ linker." OFF)
option(LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON)
option(LLVM_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF)
+option(LLVM_ENABLE_DUMP "Enable dump functions in release builds" OFF)
+
if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" )
option(LLVM_ENABLE_ASSERTIONS "Enable assertions" OFF)
else()
option(LLVM_ENABLE_ASSERTIONS "Enable assertions" ON)
endif()
-option(LLVM_ENABLE_EXPENSIVE_CHECKS "Enable expensive checks" OFF)
+if( LLVM_ENABLE_ASSERTIONS )
+ set(LLVM_ENABLE_DUMP ON)
+endif()
-option(LLVM_ENABLE_DUMP "Enable dump functions in release builds" OFF)
+option(LLVM_ENABLE_EXPENSIVE_CHECKS "Enable expensive checks" OFF)
set(LLVM_ABI_BREAKING_CHECKS "WITH_ASSERTS" CACHE STRING
"Enable abi-breaking checks. Can be WITH_ASSERTS, FORCE_ON or FORCE_OFF.")