diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake --- a/compiler-rt/cmake/config-ix.cmake +++ b/compiler-rt/cmake/config-ix.cmake @@ -394,6 +394,9 @@ set(XRAY_SUPPORTED_OS osx) set(FUZZER_SUPPORTED_OS osx) set(ORC_SUPPORTED_OS osx) + set(UBSAN_SUPPORTED_OS osx) + set(LSAN_SUPPORTED_OS osx) + set(STATS_SUPPORTED_OS osx) # Note: In order to target x86_64h on OS X the minimum deployment target must # be 10.8 or higher. @@ -480,6 +483,9 @@ list(APPEND TSAN_SUPPORTED_OS ${platform}sim) list(APPEND FUZZER_SUPPORTED_OS ${platform}sim) list(APPEND ORC_SUPPORTED_OS ${platform}sim) + list(APPEND UBSAN_SUPPORTED_OS ${platform}sim) + list(APPEND LSAN_SUPPORTED_OS ${platform}sim) + list(APPEND STATS_SUPPORTED_OS ${platform}sim) endif() foreach(arch ${DARWIN_${platform}sim_ARCHS}) list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch}) @@ -511,6 +517,9 @@ endif() list(APPEND FUZZER_SUPPORTED_OS ${platform}) list(APPEND ORC_SUPPORTED_OS ${platform}) + list(APPEND UBSAN_SUPPORTED_OS ${platform}) + list(APPEND LSAN_SUPPORTED_OS ${platform}) + list(APPEND STATS_SUPPORTED_OS ${platform}) endif() foreach(arch ${DARWIN_${platform}_ARCHS}) list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch}) diff --git a/compiler-rt/lib/lsan/CMakeLists.txt b/compiler-rt/lib/lsan/CMakeLists.txt --- a/compiler-rt/lib/lsan/CMakeLists.txt +++ b/compiler-rt/lib/lsan/CMakeLists.txt @@ -53,7 +53,7 @@ add_compiler_rt_runtime(clang_rt.lsan SHARED - OS ${SANITIZER_COMMON_SUPPORTED_OS} + OS ${LSAN_SUPPORTED_OS} ARCHS ${LSAN_SUPPORTED_ARCH} SOURCES ${LSAN_SOURCES} ADDITIONAL_HEADERS ${LSAN_HEADERS} diff --git a/compiler-rt/lib/stats/CMakeLists.txt b/compiler-rt/lib/stats/CMakeLists.txt --- a/compiler-rt/lib/stats/CMakeLists.txt +++ b/compiler-rt/lib/stats/CMakeLists.txt @@ -23,7 +23,7 @@ add_compiler_rt_runtime(clang_rt.stats ${STATS_LIB_FLAVOR} ARCHS ${SANITIZER_COMMON_SUPPORTED_ARCH} - OS ${SANITIZER_COMMON_SUPPORTED_OS} + OS ${STATS_SUPPORTED_OS} SOURCES stats.cpp ADDITIONAL_HEADERS ${STATS_HEADERS} OBJECT_LIBS RTSanitizerCommon @@ -37,7 +37,7 @@ add_compiler_rt_runtime(clang_rt.stats_client STATIC ARCHS ${SANITIZER_COMMON_SUPPORTED_ARCH} - OS ${SANITIZER_COMMON_SUPPORTED_OS} + OS ${STATS_SUPPORTED_OS} SOURCES stats_client.cpp ADDITIONAL_HEADERS ${STATS_HEADERS} CFLAGS ${SANITIZER_COMMON_CFLAGS} diff --git a/compiler-rt/lib/ubsan/CMakeLists.txt b/compiler-rt/lib/ubsan/CMakeLists.txt --- a/compiler-rt/lib/ubsan/CMakeLists.txt +++ b/compiler-rt/lib/ubsan/CMakeLists.txt @@ -83,7 +83,7 @@ if(COMPILER_RT_HAS_UBSAN) # Initializer of standalone UBSan runtime. add_compiler_rt_object_libraries(RTUbsan_standalone - OS ${SANITIZER_COMMON_SUPPORTED_OS} + OS ${UBSAN_SUPPORTED_OS} ARCHS ${UBSAN_SUPPORTED_ARCH} SOURCES ${UBSAN_STANDALONE_SOURCES} ADDITIONAL_HEADERS ${UBSAN_HEADERS} @@ -94,7 +94,7 @@ add_compiler_rt_runtime(clang_rt.ubsan SHARED - OS ${SANITIZER_COMMON_SUPPORTED_OS} + OS ${UBSAN_SUPPORTED_OS} ARCHS ${UBSAN_SUPPORTED_ARCH} OBJECT_LIBS RTUbsan RTUbsan_standalone @@ -108,7 +108,7 @@ add_compiler_rt_runtime(clang_rt.ubsan STATIC - OS ${SANITIZER_COMMON_SUPPORTED_OS} + OS ${UBSAN_SUPPORTED_OS} ARCHS ${UBSAN_SUPPORTED_ARCH} OBJECT_LIBS RTUbsan RTUbsan_standalone diff --git a/compiler-rt/lib/ubsan_minimal/CMakeLists.txt b/compiler-rt/lib/ubsan_minimal/CMakeLists.txt --- a/compiler-rt/lib/ubsan_minimal/CMakeLists.txt +++ b/compiler-rt/lib/ubsan_minimal/CMakeLists.txt @@ -26,7 +26,7 @@ # Standalone minimal UBSan runtimes. add_compiler_rt_runtime(clang_rt.ubsan_minimal STATIC - OS ${SANITIZER_COMMON_SUPPORTED_OS} + OS ${UBSAN_SUPPORTED_OS} ARCHS ${UBSAN_SUPPORTED_ARCH} OBJECT_LIBS RTUbsan_minimal CFLAGS ${UBSAN_CFLAGS} @@ -34,7 +34,7 @@ add_compiler_rt_runtime(clang_rt.ubsan_minimal SHARED - OS ${SANITIZER_COMMON_SUPPORTED_OS} + OS ${UBSAN_SUPPORTED_OS} ARCHS ${UBSAN_SUPPORTED_ARCH} OBJECT_LIBS RTUbsan_minimal CFLAGS ${UBSAN_CFLAGS} diff --git a/compiler-rt/test/ubsan/CMakeLists.txt b/compiler-rt/test/ubsan/CMakeLists.txt --- a/compiler-rt/test/ubsan/CMakeLists.txt +++ b/compiler-rt/test/ubsan/CMakeLists.txt @@ -109,7 +109,7 @@ # "check-asan-iossim-x86_64" and similar. They also require that an extra env # variable to select which iOS device or simulator to use, e.g.: # SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER="iPhone 6" - set(UBSAN_APPLE_PLATFORMS ${SANITIZER_COMMON_SUPPORTED_OS}) + set(UBSAN_APPLE_PLATFORMS ${UBSAN_SUPPORTED_OS}) foreach(platform ${UBSAN_APPLE_PLATFORMS}) list_intersect( UBSAN_TEST_${platform}_ARCHS