[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
Tue Feb 18 09:39:43 PST 2020


yln marked 3 inline comments as done.
yln added inline comments.


================
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}")
----------------
delcypher wrote:
> @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.
Ahh, I didn't realize `VERSION_GREATER_EQUAL` isn't available in older versions of CMake.  Good catch!


================
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)
----------------
delcypher wrote:
> 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.
I would like to fail the build for "macOS SDK < 10.12 or aligned SDK versions on other platforms".  Do you know how to best express that?


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