diff options
author | Michael Gottesman <mgottesman@apple.com> | 2017-06-20 20:28:07 +0000 |
---|---|---|
committer | Michael Gottesman <mgottesman@apple.com> | 2017-06-20 20:28:07 +0000 |
commit | 7265da810642497b6f84f5b55f932286b546b651 (patch) | |
tree | 5649e3bc93d5f3b776f01e1012be7098e21e4c14 | |
parent | 9698f1c862f734651838add7874db5750e9a67fa (diff) | |
download | bcm5719-llvm-7265da810642497b6f84f5b55f932286b546b651.tar.gz bcm5719-llvm-7265da810642497b6f84f5b55f932286b546b651.zip |
[cmake] Add support for using the standalone leaks sanitizer with LLVM.
This commit causes LLVM_USE_SANITIZER to now accept the "Leaks" option. This
will cause cmake to pass in -fsanitize=leak in all of the appropriate places.
I am making this change so that I can setup a linux bot that only detects
leaks.
llvm-svn: 305839
-rw-r--r-- | llvm/cmake/modules/HandleLLVMOptions.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake index c3325db1178..98f58d7b197 100644 --- a/llvm/cmake/modules/HandleLLVMOptions.cmake +++ b/llvm/cmake/modules/HandleLLVMOptions.cmake @@ -642,6 +642,9 @@ if(LLVM_USE_SANITIZER) append_common_sanitizer_flags() append("-fsanitize=address,undefined -fno-sanitize=vptr,function -fno-sanitize-recover=all" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) + elseif (LLVM_USE_SANITIZER STREQUAL "Leaks") + append_common_sanitizer_flags() + append("-fsanitize=leak" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) else() message(FATAL_ERROR "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}") endif() |