[PATCH] D74501: [TSan] Add CMake check for minimal SDK requirements on Darwin
Julian Lettner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 12 13:11:02 PST 2020
yln created this revision.
yln added reviewers: dmajor, hans, delcypher, kubamracek, dcoughlin.
Herald added subscribers: llvm-commits, Sanitizers, Charusso, mgorny.
Herald added projects: Sanitizers, LLVM.
Fails with the following message in the error case:
CMake Error at /path/to/llvm-project/compiler-rt/lib/tsan/CMakeLists.txt:119 (message):
Building the TSan runtime requires at least macOS SDK 10.12
Fixes #44682.
https://bugs.llvm.org/show_bug.cgi?id=44682
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D74501
Files:
compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
compiler-rt/lib/tsan/CMakeLists.txt
Index: compiler-rt/lib/tsan/CMakeLists.txt
===================================================================
--- compiler-rt/lib/tsan/CMakeLists.txt
+++ compiler-rt/lib/tsan/CMakeLists.txt
@@ -114,6 +114,11 @@
add_compiler_rt_component(tsan)
if(APPLE)
+ find_darwin_sdk_version(macosx_sdk_version "macosx")
+ if ("${macosx_sdk_version}" VERSION_LESS 10.12)
+ message(FATAL_ERROR "Building the TSan runtime requires at least macOS SDK 10.12")
+ endif()
+
add_asm_sources(TSAN_ASM_SOURCES rtl/tsan_rtl_amd64.S rtl/tsan_rtl_aarch64.S)
set(TSAN_LINK_LIBS ${SANITIZER_COMMON_LINK_LIBS})
Index: compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
===================================================================
--- compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
+++ compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -125,7 +125,7 @@
# binaries.
if ("${os}" STREQUAL "osx")
find_darwin_sdk_version(macosx_sdk_version "macosx")
- if ("${macosx_sdk_version}" VERSION_GREATER 10.15 OR "${macosx_sdk_version}" VERSION_EQUAL 10.15)
+ if ("${macosx_sdk_version}" VERSION_GREATER_EQUAL 10.15)
message(STATUS "Disabling i386 slice for ${valid_archs}")
list(REMOVE_ITEM archs "i386")
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74501.244256.patch
Type: text/x-patch
Size: 1268 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200212/1b7c59ac/attachment.bin>
More information about the llvm-commits
mailing list