CMake: Add option to set LLVM_ENABLE_DUMP

Differential Revision: https://reviews.llvm.org/D38267

llvm-svn: 314186
This commit is contained in:
Matthias Braun 2017-09-26 02:36:58 +00:00
parent cc603ee3d5
commit c9e458ca3f
2 changed files with 6 additions and 0 deletions

View File

@ -396,6 +396,8 @@ endif()
option(LLVM_ENABLE_EXPENSIVE_CHECKS "Enable expensive checks" OFF)
option(LLVM_ENABLE_DUMP "Enable dump functions in release builds" OFF)
set(LLVM_ABI_BREAKING_CHECKS "WITH_ASSERTS" CACHE STRING
"Enable abi-breaking checks. Can be WITH_ASSERTS, FORCE_ON or FORCE_OFF.")

View File

@ -84,6 +84,10 @@ if(LLVM_ENABLE_EXPENSIVE_CHECKS)
add_definitions(-D_GLIBCXX_DEBUG)
endif()
if(LLVM_ENABLE_DUMP)
add_definitions(-DLLVM_ENABLE_DUMP)
endif()
string(TOUPPER "${LLVM_ABI_BREAKING_CHECKS}" uppercase_LLVM_ABI_BREAKING_CHECKS)
if( uppercase_LLVM_ABI_BREAKING_CHECKS STREQUAL "WITH_ASSERTS" )