[CMake] [Darwin] [builtins] Change condition for skipping cc_kext to be setting based.

This is needed because we need to skip cc_kext generation for more than just the simulator builds.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248939 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/cmake/Modules/CompilerRTDarwinUtils.cmake b/cmake/Modules/CompilerRTDarwinUtils.cmake
index 12c1747..e2fe795 100644
--- a/cmake/Modules/CompilerRTDarwinUtils.cmake
+++ b/cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -270,7 +270,7 @@
     endforeach()
 
     # Don't build cc_kext libraries for simulator platforms
-    if(NOT ${os} MATCHES ".*sim$")
+    if(NOT DARWIN_${os}_SKIP_CC_KEXT)
       foreach (arch ${DARWIN_BUILTIN_ARCHS})
         # By not specifying MIN_VERSION this only reads the OS and OS-arch lists.
         # We don't want to filter out the builtins that are present in libSystem
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 3b29f87..a3f2a2a 100644
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -356,6 +356,7 @@
 
       list(APPEND SANITIZER_COMMON_SUPPORTED_OS iossim)
       list(APPEND BUILTIN_SUPPORTED_OS iossim)
+      set(DARWIN_iossim_SKIP_CC_KEXT On)
       darwin_test_archs(iossim
         DARWIN_iossim_ARCHS
         ${toolchain_arches})