[PATCH] D32191: Enable lsan test suite for darwin x86-64
Francis Ricci via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 12 08:23:23 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL302904: Enable lsan test suite on Darwin x86_64 builds (authored by fjricci).
Changed prior to commit:
https://reviews.llvm.org/D32191?vs=96021&id=98771#toc
Repository:
rL LLVM
https://reviews.llvm.org/D32191
Files:
compiler-rt/trunk/cmake/config-ix.cmake
compiler-rt/trunk/test/asan/lit.cfg
compiler-rt/trunk/test/lsan/lit.common.cfg
Index: compiler-rt/trunk/cmake/config-ix.cmake
===================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake
+++ compiler-rt/trunk/cmake/config-ix.cmake
@@ -476,7 +476,7 @@
endif()
if (COMPILER_RT_HAS_SANITIZER_COMMON AND LSAN_SUPPORTED_ARCH AND
- OS_NAME MATCHES "Linux|FreeBSD")
+ OS_NAME MATCHES "Darwin|Linux|FreeBSD")
set(COMPILER_RT_HAS_LSAN TRUE)
else()
set(COMPILER_RT_HAS_LSAN FALSE)
Index: compiler-rt/trunk/test/lsan/lit.common.cfg
===================================================================
--- compiler-rt/trunk/test/lsan/lit.common.cfg
+++ compiler-rt/trunk/test/lsan/lit.common.cfg
@@ -67,9 +67,10 @@
config.substitutions.append( ("%clang_lsan ", build_invocation(clang_lsan_cflags)) )
config.substitutions.append( ("%clangxx_lsan ", build_invocation(clang_lsan_cxxflags)) )
-# LeakSanitizer tests are currently supported on x86-64 Linux, PowerPC64 Linux, arm Linux, and mips64 Linux only.
+# LeakSanitizer tests are currently supported on x86-64 Linux, PowerPC64 Linux, arm Linux, mips64 Linux, and x86_64 Darwin.
supported_linux = config.host_os is 'Linux' and config.host_arch in ['x86_64', 'ppc64', 'mips64', 'arm', 'armhf', 'armv7l']
-if not (supported_linux):
+supported_darwin = config.host_os is 'Darwin' and config.target_arch is 'x86_64'
+if not (supported_linux or supported_darwin):
config.unsupported = True
# Don't support Thumb due to broken fast unwinder
Index: compiler-rt/trunk/test/asan/lit.cfg
===================================================================
--- compiler-rt/trunk/test/asan/lit.cfg
+++ compiler-rt/trunk/test/asan/lit.cfg
@@ -38,6 +38,11 @@
# Also, make sure we do not overwhelm the syslog while testing.
default_asan_opts = 'abort_on_error=0'
default_asan_opts += ':log_to_syslog=0'
+
+ # On Darwin, leak checking is not enabled by default. Enable for x86_64
+ # tests to prevent regressions
+ if config.target_arch == 'x86_64':
+ default_asan_opts += ':detect_leaks=1'
elif config.android:
# The same as on Darwin, we default to "abort_on_error=1" which slows down
# testing. Also, all existing tests are using "not" instead of "not --crash"
@@ -215,7 +220,9 @@
config.available_features.add('fast-unwinder-works')
# Turn on leak detection on 64-bit Linux.
-if config.host_os == 'Linux' and (config.target_arch == 'x86_64' or config.target_arch == 'i386'):
+leak_detection_linux = (config.host_os == 'Linux') and (config.target_arch == 'x86_64' or config.target_arch == 'i386')
+leak_detection_mac = (config.host_os == 'Darwin') and (config.target_arch == 'x86_64')
+if leak_detection_linux or leak_detection_mac:
config.available_features.add('leak-detection')
# Set LD_LIBRARY_PATH to pick dynamic runtime up properly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32191.98771.patch
Type: text/x-patch
Size: 2798 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170512/f40a8e25/attachment.bin>
More information about the llvm-commits
mailing list