llvm.org GIT mirror llvm / 864e349
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305839 91177308-0d34-0410-b5e6-96231b3b80d8 Michael Gottesman 2 years ago
1 changed file(s) with 3 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
641641 append_common_sanitizer_flags()
642642 append("-fsanitize=address,undefined -fno-sanitize=vptr,function -fno-sanitize-recover=all"
643643 CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
644 elseif (LLVM_USE_SANITIZER STREQUAL "Leaks")
645 append_common_sanitizer_flags()
646 append("-fsanitize=leak" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
644647 else()
645648 message(FATAL_ERROR "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}")
646649 endif()