diff options
| author | Justin Bogner <mail@justinbogner.com> | 2015-09-01 05:45:07 +0000 |
|---|---|---|
| committer | Justin Bogner <mail@justinbogner.com> | 2015-09-01 05:45:07 +0000 |
| commit | 1ded69870e144e75b7a812411e67cace4174695e (patch) | |
| tree | c5bbcf54fcf293300dde8f1d5a55f15f95130a98 /llvm/cmake | |
| parent | bf67a30bddf40aca95bc0bd2e72f550ba659efb1 (diff) | |
| download | bcm5719-llvm-1ded69870e144e75b7a812411e67cace4174695e.tar.gz bcm5719-llvm-1ded69870e144e75b7a812411e67cace4174695e.zip | |
cmake: Error instead of warning and dropping invalid LLVM_USE_SANITIZER
Currently, if you call cmake with a typo in an LLVM_USE_SANITIZER
value, there's a cmake warning and the build goes on with no
sanitizers at all. This isn't a good behaviour, since cmake warnings
are fairly easy to miss and the resulting behaviour is that it looks
like the build is sanitizer clean.
Upgrade these warnings to errors so misconfigurations are more
obvious.
llvm-svn: 246531
Diffstat (limited to 'llvm/cmake')
| -rw-r--r-- | llvm/cmake/modules/HandleLLVMOptions.cmake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake index 76b9c3fb7ed..405e8ac00da 100644 --- a/llvm/cmake/modules/HandleLLVMOptions.cmake +++ b/llvm/cmake/modules/HandleLLVMOptions.cmake @@ -507,17 +507,17 @@ if(LLVM_USE_SANITIZER) append("-fsanitize=address,undefined -fno-sanitize=vptr,function -fno-sanitize-recover=all" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) else() - message(WARNING "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}") + message(FATAL_ERROR "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}") endif() elseif(MSVC) if (LLVM_USE_SANITIZER STREQUAL "Address") append_common_sanitizer_flags() append("-fsanitize=address" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) else() - message(WARNING "This sanitizer not yet supported in the MSVC environment: ${LLVM_USE_SANITIZER}") + message(FATAL_ERROR "This sanitizer not yet supported in the MSVC environment: ${LLVM_USE_SANITIZER}") endif() else() - message(WARNING "LLVM_USE_SANITIZER is not supported on this platform.") + message(FATAL_ERROR "LLVM_USE_SANITIZER is not supported on this platform.") endif() if (LLVM_USE_SANITIZE_COVERAGE) append("-fsanitize-coverage=edge,indirect-calls,8bit-counters,trace-cmp" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) |

