[PATCH] D24990: [ubsan] Turn on 'Has CXXABI' to enable support for -fsanitize=vptr on Darwin
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 27 15:06:22 PDT 2016
vsk created this revision.
vsk added reviewers: beanz, fjricci.
vsk added a subscriber: llvm-commits.
Herald added subscribers: mgorny, beanz.
-fsanitize=vptr doesn't work on Darwin because we don't compile the necessary sanitizer handlers.
Fix the issue by exposing the definition of SANITIZER_MIN_OSX_VERSION to the logic which sets "use_cxxabi_default". Once this definition is available, we can verify that the user's version of macOS supports -fsanitize=vptr and then turn it on.
https://reviews.llvm.org/D24990
Files:
CMakeLists.txt
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -85,6 +85,8 @@
# COMPILER_RT_DEBUG_PYBOOL is used by lit.common.configured.in.
pythonize_bool(COMPILER_RT_DEBUG)
+include(config-ix)
+
if(APPLE AND SANITIZER_MIN_OSX_VERSION VERSION_LESS "10.9")
# Mac OS X prior to 10.9 had problems with exporting symbols from
# libc++/libc++abi.
@@ -102,8 +104,6 @@
# Setup Compiler Flags
#================================
-include(config-ix)
-
if(MSVC)
# Override any existing /W flags with /W4. This is what LLVM does. Failing to
# remove other /W[0-4] flags will result in a warning about overriding a
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24990.72718.patch
Type: text/x-patch
Size: 694 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160927/e97c131d/attachment.bin>
More information about the llvm-commits
mailing list