--- a/projects/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake.orig	2020-04-20 17:14:08.000000000 -0700
+++ b/projects/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake	2020-04-20 17:31:44.000000000 -0700
@@ -66,15 +66,6 @@
       ERROR_FILE /dev/null
     )
   endif()
-  if(NOT result_process EQUAL 0)
-    message(FATAL_ERROR
-      "Failed to determine SDK version for \"${sdk_name}\" SDK")
-  endif()
-  # Check reported version looks sane.
-  if (NOT "${var_internal}" MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+)?$")
-    message(FATAL_ERROR
-      "Reported SDK version \"${var_internal}\" does not look like a version")
-  endif()
   set(${var} ${var_internal} PARENT_SCOPE)
 endfunction()
 
@@ -125,6 +116,11 @@
     # binaries.
     if ("${os}" STREQUAL "osx")
       find_darwin_sdk_version(macosx_sdk_version "macosx")
+      # if there is no sdk that responds to "macosx" use the CMAKE passed in deployment target
+      if(NOT macosx_sdk_version)
+        message(WARNING "Could not determine MacOSX SDK Version, trying CMAKE_OSX_DEPLOYMENT_TARGET")
+        set(macosx_sdk_version CMAKE_OSX_DEPLOYMENT_TARGET)
+      endif()
       if ("${macosx_sdk_version}" VERSION_GREATER 10.15 OR "${macosx_sdk_version}" VERSION_EQUAL 10.15)
         message(STATUS "Disabling i386 slice for ${valid_archs}")
         list(REMOVE_ITEM archs "i386")
