[PATCH] D37646: [ubsan-minimal] Enable on Darwin

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 11 14:39:30 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL312959: [ubsan-minimal] Enable on Darwin (authored by vedantk).

Changed prior to commit:
  https://reviews.llvm.org/D37646?vs=114667&id=114705#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D37646

Files:
  compiler-rt/trunk/cmake/config-ix.cmake
  compiler-rt/trunk/lib/ubsan_minimal/CMakeLists.txt
  compiler-rt/trunk/test/ubsan_minimal/lit.common.cfg


Index: compiler-rt/trunk/lib/ubsan_minimal/CMakeLists.txt
===================================================================
--- compiler-rt/trunk/lib/ubsan_minimal/CMakeLists.txt
+++ compiler-rt/trunk/lib/ubsan_minimal/CMakeLists.txt
@@ -16,6 +16,7 @@
 
 # Common parts of UBSan runtime.
 add_compiler_rt_object_libraries(RTUbsan_minimal
+  OS ${SANITIZER_COMMON_SUPPORTED_OS}
   ARCHS ${UBSAN_COMMON_SUPPORTED_ARCH}
   SOURCES ${UBSAN_MINIMAL_SOURCES} CFLAGS ${UBSAN_CFLAGS})
 
@@ -26,20 +27,22 @@
   # Standalone UBSan runtimes.
   add_compiler_rt_runtime(clang_rt.ubsan_minimal
     STATIC
+    OS ${SANITIZER_COMMON_SUPPORTED_OS}
     ARCHS ${UBSAN_SUPPORTED_ARCH}
     OBJECT_LIBS RTUbsan_minimal
     CFLAGS ${UBSAN_CFLAGS}
     PARENT_TARGET ubsan-minimal)
 
   add_compiler_rt_runtime(clang_rt.ubsan_minimal
     SHARED
+    OS ${SANITIZER_COMMON_SUPPORTED_OS}
     ARCHS ${UBSAN_SUPPORTED_ARCH}
     OBJECT_LIBS RTUbsan_minimal
     CFLAGS ${UBSAN_CFLAGS}
     LINK_LIBS ${UBSAN_DYNAMIC_LIBS}
     PARENT_TARGET ubsan-minimal)
 
-  if (UNIX)
+  if (UNIX AND NOT APPLE)
     set(ARCHS_FOR_SYMBOLS ${UBSAN_SUPPORTED_ARCH})
     list(REMOVE_ITEM ARCHS_FOR_SYMBOLS i386 i686)
     add_sanitizer_rt_symbols(clang_rt.ubsan_minimal
Index: compiler-rt/trunk/cmake/config-ix.cmake
===================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake
+++ compiler-rt/trunk/cmake/config-ix.cmake
@@ -546,7 +546,7 @@
 endif()
 
 if (COMPILER_RT_HAS_SANITIZER_COMMON AND UBSAN_SUPPORTED_ARCH AND
-    OS_NAME MATCHES "Linux|FreeBSD|NetBSD|Android")
+    OS_NAME MATCHES "Linux|FreeBSD|NetBSD|Android|Darwin")
   set(COMPILER_RT_HAS_UBSAN_MINIMAL TRUE)
 else()
   set(COMPILER_RT_HAS_UBSAN_MINIMAL FALSE)
Index: compiler-rt/trunk/test/ubsan_minimal/lit.common.cfg
===================================================================
--- compiler-rt/trunk/test/ubsan_minimal/lit.common.cfg
+++ compiler-rt/trunk/test/ubsan_minimal/lit.common.cfg
@@ -30,7 +30,7 @@
 config.suffixes = ['.c', '.cc', '.cpp']
 
 # Check that the host supports UndefinedBehaviorSanitizerMinimal tests
-if config.host_os not in ['Linux', 'FreeBSD', 'NetBSD']: # TODO: Darwin, Windows
+if config.host_os not in ['Linux', 'FreeBSD', 'NetBSD', 'Darwin']: # TODO: Windows
   config.unsupported = True
 
 config.available_features.add('arch=' + config.target_arch)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37646.114705.patch
Type: text/x-patch
Size: 2375 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170911/07e66cdc/attachment.bin>


More information about the llvm-commits mailing list