[PATCH] D42236: Enable sanitizer_common tests on NetBSD

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 02:34:19 PST 2018


krytarowski created this revision.
krytarowski added reviewers: joerg, vitalybuka.
krytarowski added a project: Sanitizers.
Herald added subscribers: mgorny, kubamracek, srhines.

NetBSD can handle asan, ubsan, msan, tsan tests
on 64-bit and when applicable 32-bit X86 OS.

Sponsored by <The NetBSD Foundation>


Repository:
  rL LLVM

https://reviews.llvm.org/D42236

Files:
  test/sanitizer_common/CMakeLists.txt
  test/sanitizer_common/lit.common.cfg


Index: test/sanitizer_common/lit.common.cfg
===================================================================
--- test/sanitizer_common/lit.common.cfg
+++ test/sanitizer_common/lit.common.cfg
@@ -59,5 +59,5 @@
 
 config.suffixes = ['.c', '.cc', '.cpp']
 
-if config.host_os not in ['Linux', 'Darwin']:
+if config.host_os not in ['Linux', 'Darwin', 'NetBSD']:
   config.unsupported = True
Index: test/sanitizer_common/CMakeLists.txt
===================================================================
--- test/sanitizer_common/CMakeLists.txt
+++ test/sanitizer_common/CMakeLists.txt
@@ -7,12 +7,14 @@
 if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux|FreeBSD|NetBSD|SunOS")
   list(APPEND SUPPORTED_TOOLS asan)
 endif()
-if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT ANDROID)
+if(CMAKE_SYSTEM_NAME MATCHES "NetBSD" OR (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT ANDROID))
   list(APPEND SUPPORTED_TOOLS tsan)
   list(APPEND SUPPORTED_TOOLS msan)
-  list(APPEND SUPPORTED_TOOLS lsan)
   list(APPEND SUPPORTED_TOOLS ubsan)
 endif()
+if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT ANDROID)
+  list(APPEND SUPPORTED_TOOLS lsan)
+endif()
 
 # Create a separate config for each tool we support.
 foreach(tool ${SUPPORTED_TOOLS})


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42236.130375.patch
Type: text/x-patch
Size: 1214 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180118/c59c2d6b/attachment.bin>


More information about the llvm-commits mailing list