diff --git a/compiler-rt/cmake/builtin-config-ix.cmake b/compiler-rt/cmake/builtin-config-ix.cmake --- a/compiler-rt/cmake/builtin-config-ix.cmake +++ b/compiler-rt/cmake/builtin-config-ix.cmake @@ -116,6 +116,10 @@ ${DARWIN_ios_MIN_VER_FLAG}=${DARWIN_ios_BUILTIN_MIN_VER}) set(DARWIN_ios_BUILTIN_ALL_POSSIBLE_ARCHS ${ARM64} ${ARM32}) set(DARWIN_iossim_BUILTIN_ALL_POSSIBLE_ARCHS ${X86} ${X86_64}) + find_darwin_sdk_version(iossim_sdk_version "iphonesimulator") + if ("${iossim_sdk_version}" VERSION_GREATER 14.0 OR "${iossim_sdk_version}" VERSION_EQUAL 14.0) + list(APPEND DARWIN_iossim_BUILTIN_ALL_POSSIBLE_ARCHS arm64) + endif() endif() if(COMPILER_RT_ENABLE_WATCHOS) list(APPEND DARWIN_EMBEDDED_PLATFORMS watchos) @@ -125,6 +129,10 @@ ${DARWIN_watchos_MIN_VER_FLAG}=${DARWIN_watchos_BUILTIN_MIN_VER}) set(DARWIN_watchos_BUILTIN_ALL_POSSIBLE_ARCHS armv7 armv7k arm64_32) set(DARWIN_watchossim_BUILTIN_ALL_POSSIBLE_ARCHS ${X86}) + find_darwin_sdk_version(watchossim_sdk_version "watchsimulator") + if ("${watchossim_sdk_version}" VERSION_GREATER 7.0 OR "${watchossim_sdk_version}" VERSION_EQUAL 7.0) + list(APPEND DARWIN_watchossim_BUILTIN_ALL_POSSIBLE_ARCHS arm64) + endif() endif() if(COMPILER_RT_ENABLE_TVOS) list(APPEND DARWIN_EMBEDDED_PLATFORMS tvos) @@ -134,6 +142,10 @@ ${DARWIN_tvos_MIN_VER_FLAG}=${DARWIN_tvos_BUILTIN_MIN_VER}) set(DARWIN_tvos_BUILTIN_ALL_POSSIBLE_ARCHS armv7 arm64) set(DARWIN_tvossim_BUILTIN_ALL_POSSIBLE_ARCHS ${X86} ${X86_64}) + find_darwin_sdk_version(tvossim_sdk_version "appletvsimulator") + if ("${tvossim_sdk_version}" VERSION_GREATER 14.0 OR "${tvossim_sdk_version}" VERSION_EQUAL 14.0) + list(APPEND DARWIN_tvossim_BUILTIN_ALL_POSSIBLE_ARCHS arm64) + endif() endif() set(BUILTIN_SUPPORTED_OS osx)