[compiler-rt] r312959 - [ubsan-minimal] Enable on Darwin
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 11 14:37:54 PDT 2017
Author: vedantk
Date: Mon Sep 11 14:37:53 2017
New Revision: 312959
URL: http://llvm.org/viewvc/llvm-project?rev=312959&view=rev
Log:
[ubsan-minimal] Enable on Darwin
Testing: check-ubsan-minimal
Differential Revision: https://reviews.llvm.org/D37646
Modified:
compiler-rt/trunk/cmake/config-ix.cmake
compiler-rt/trunk/lib/ubsan_minimal/CMakeLists.txt
compiler-rt/trunk/test/ubsan_minimal/lit.common.cfg
Modified: compiler-rt/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=312959&r1=312958&r2=312959&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake (original)
+++ compiler-rt/trunk/cmake/config-ix.cmake Mon Sep 11 14:37:53 2017
@@ -546,7 +546,7 @@ else()
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)
Modified: compiler-rt/trunk/lib/ubsan_minimal/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan_minimal/CMakeLists.txt?rev=312959&r1=312958&r2=312959&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan_minimal/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/ubsan_minimal/CMakeLists.txt Mon Sep 11 14:37:53 2017
@@ -16,6 +16,7 @@ add_compiler_rt_component(ubsan-minimal)
# 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,6 +27,7 @@ if(COMPILER_RT_HAS_UBSAN_MINIMAL)
# 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}
@@ -33,13 +35,14 @@ if(COMPILER_RT_HAS_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
Modified: compiler-rt/trunk/test/ubsan_minimal/lit.common.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan_minimal/lit.common.cfg?rev=312959&r1=312958&r2=312959&view=diff
==============================================================================
--- compiler-rt/trunk/test/ubsan_minimal/lit.common.cfg (original)
+++ compiler-rt/trunk/test/ubsan_minimal/lit.common.cfg Mon Sep 11 14:37:53 2017
@@ -30,7 +30,7 @@ config.substitutions.append( ("%clangxx
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)
More information about the llvm-commits
mailing list