[PATCH] Handle LLVM_USE_SANITIZER=Address; Undefined (and the other way around)
Filipe Cabecinhas
filcab+llvm.phabricator at gmail.com
Wed Feb 4 14:35:14 PST 2015
REPOSITORY
rL LLVM
http://reviews.llvm.org/D7024
Files:
llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
Index: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
@@ -404,6 +404,11 @@
elseif (LLVM_USE_SANITIZER STREQUAL "Thread")
append_common_sanitizer_flags()
append("-fsanitize=thread" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ elseif (LLVM_USE_SANITIZER STREQUAL "Address;Undefined" OR
+ LLVM_USE_SANITIZER STREQUAL "Undefined;Address")
+ append_common_sanitizer_flags()
+ append("-fsanitize=address,undefined -fno-sanitize=vptr,function -fno-sanitize-recover"
+ CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
else()
message(WARNING "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}")
endif()
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7024.19351.patch
Type: text/x-patch
Size: 826 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150204/f1689968/attachment.bin>
More information about the llvm-commits
mailing list