[PATCH] D74501: [TSan] Add CMake check for minimal SDK requirements on Darwin

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 17 18:48:05 PST 2020


delcypher requested changes to this revision.
delcypher added inline comments.
This revision now requires changes to proceed.


================
Comment at: compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake:128
       find_darwin_sdk_version(macosx_sdk_version "macosx")
-      if ("${macosx_sdk_version}" VERSION_GREATER 10.15 OR "${macosx_sdk_version}" VERSION_EQUAL 10.15)
         message(STATUS "Disabling i386 slice for ${valid_archs}")
----------------
@yln Why are you changing this? This is a different piece of functionality and this verbose-ness is also deliberate. Older versions of CMake do not support `VERSION_GREATER_EQUAL` and so this change will break the build for older CMake versions.


================
Comment at: compiler-rt/lib/tsan/CMakeLists.txt:117
 if(APPLE)
+  find_darwin_sdk_version(macosx_sdk_version "macosx")
+  if ("${macosx_sdk_version}" VERSION_LESS 10.12)
----------------
You need to guard this check on `osx` being present in `${TSAN_SUPPORTED_OS}`. It's possible to have compiler-rt not target `osx` so we shouldn't fatal error when we aren't actually building for macOS.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74501/new/

https://reviews.llvm.org/D74501





More information about the llvm-commits mailing list