Skip to content

Commit

Permalink
CMake: Add option to set LLVM_ENABLE_DUMP
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D38267

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314186 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
MatzeB committed Sep 26, 2017
1 parent 77cad59 commit ec9231b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.")

Expand Down
4 changes: 4 additions & 0 deletions cmake/modules/HandleLLVMOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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" )
Expand Down

0 comments on commit ec9231b

Please sign in to comment.