Repository: swiftlang/swift
Pull request #81618: [cmake] add Synchronization specific cache files
Author: login: justice-adams-apple
Created: 2025-05-19T19:46:31Z | Merged: 2025-05-23T18:42:08Z

Add the cache files relevant for building the Synchronization supplemental library


Diff:
diff --git a/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/apple-common.cmake b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/apple-common.cmake
new file mode 100644
index 0000000000000..045a720d448c1
--- /dev/null
+++ b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/apple-common.cmake
@@ -0,0 +1,7 @@
+set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
+set(BUILD_SHARED_LIBS YES CACHE BOOL "")
+set(SwiftSynchronization_INSTALL_NESTED_SUBDIR OFF CACHE BOOL "")
+
+set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -g -DNDEBUG" CACHE STRING "")
+set(CMAKE_C_FLAGS_MINSIZEREL "-Os -g -DNDEBUG" CACHE STRING "")
+set(CMAKE_Swift_FLAGS_MINSIZEREL "-Osize -g" CACHE STRING "")
diff --git a/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-AppleTVOS-simulator.cmake b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-AppleTVOS-simulator.cmake
new file mode 100644
index 0000000000000..4ddb5b22db83d
--- /dev/null
+++ b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-AppleTVOS-simulator.cmake
@@ -0,0 +1,12 @@
+if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not defined")
+endif()
+
+set(CMAKE_C_COMPILER_TARGET "arm64-apple-tvos${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "arm64-apple-tvos${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+set(CMAKE_Swift_COMPILER_TARGET "arm64-apple-tvos${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+
+set(SwiftSynchronization_ARCH_SUBDIR arm64 CACHE STRING "")
+set(SwiftSynchronization_PLATFORM_SUBDIR appletvsimulator CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/apple-common.cmake")
diff --git a/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-AppleTVOS.cmake b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-AppleTVOS.cmake
new file mode 100644
index 0000000000000..767b7fb22d150
--- /dev/null
+++ b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-AppleTVOS.cmake
@@ -0,0 +1,12 @@
+if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not defined")
+endif()
+
+set(CMAKE_C_COMPILER_TARGET "arm64-apple-tvos${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "arm64-apple-tvos${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+set(CMAKE_Swift_COMPILER_TARGET "arm64-apple-tvos${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+
+set(SwiftSynchronization_ARCH_SUBDIR arm64 CACHE STRING "")
+set(SwiftSynchronization_PLATFORM_SUBDIR appletvos CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/apple-common.cmake")
diff --git a/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-BridgeOS.cmake b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-BridgeOS.cmake
new file mode 100644
index 0000000000000..f7bc2b4407260
--- /dev/null
+++ b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-BridgeOS.cmake
@@ -0,0 +1,13 @@
+if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not defined")
+endif()
+
+set(CMAKE_C_COMPILER_TARGET "arm64-apple-bridgeos${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "arm64-apple-bridgeos${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+set(CMAKE_Swift_COMPILER_TARGET "arm64-apple-bridgeos${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+
+set(SwiftSynchronization_ARCH_SUBDIR arm64 CACHE STRING "")
+set(SwiftSynchronization_PLATFORM_SUBDIR freestanding CACHE STRING "")
+set(CMAKE_BUILD_TYPE MinSizeRel CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/apple-common.cmake")
diff --git a/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-MacOSX.cmake b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-MacOSX.cmake
new file mode 100644
index 0000000000000..22e345648bd07
--- /dev/null
+++ b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-MacOSX.cmake
@@ -0,0 +1,18 @@
+if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not defined")
+endif()
+
+if(NOT DEFINED SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET not defined")
+endif()
+
+set(CMAKE_C_COMPILER_TARGET "arm64-apple-macosx${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "arm64-apple-macosx${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+set(CMAKE_Swift_COMPILER_TARGET "arm64-apple-macosx${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+
+set(SwiftSynchronization_ARCH_SUBDIR arm64 CACHE STRING "")
+set(SwiftSynchronization_PLATFORM_SUBDIR macosx CACHE STRING "")
+
+set(SwiftSynchronization_COMPILER_VARIANT_TARGET "arm64-apple-ios${SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET}-macabi" CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/apple-common.cmake")
diff --git a/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-WatchOS-simulator.cmake b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-WatchOS-simulator.cmake
new file mode 100644
index 0000000000000..f9856d3590382
--- /dev/null
+++ b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-WatchOS-simulator.cmake
@@ -0,0 +1,12 @@
+if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not defined")
+endif()
+
+set(CMAKE_C_COMPILER_TARGET "arm64-apple-watchos${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "arm64-apple-watchos${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+set(CMAKE_Swift_COMPILER_TARGET "arm64-apple-watchos${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+
+set(SwiftSynchronization_ARCH_SUBDIR arm64 CACHE STRING "")
+set(SwiftSynchronization_PLATFORM_SUBDIR watchsimulator CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/apple-common.cmake")
diff --git a/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-XROS-simulator.cmake b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-XROS-simulator.cmake
new file mode 100644
index 0000000000000..e0c728b134474
--- /dev/null
+++ b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-XROS-simulator.cmake
@@ -0,0 +1,12 @@
+if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not defined")
+endif()
+
+set(CMAKE_C_COMPILER_TARGET "arm64-apple-xros${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "arm64-apple-xros${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+set(CMAKE_Swift_COMPILER_TARGET "arm64-apple-xros${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+
+set(SwiftSynchronization_ARCH_SUBDIR arm64 CACHE STRING "")
+set(SwiftSynchronization_PLATFORM_SUBDIR xrsimulator CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/apple-common.cmake")
diff --git a/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-iPhoneOS-simulator.cmake b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-iPhoneOS-simulator.cmake
new file mode 100644
index 0000000000000..827858a5faea2
--- /dev/null
+++ b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-iPhoneOS-simulator.cmake
@@ -0,0 +1,12 @@
+if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not defined")
+endif()
+
+set(CMAKE_C_COMPILER_TARGET "arm64-apple-ios${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "arm64-apple-ios${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+set(CMAKE_Swift_COMPILER_TARGET "arm64-apple-ios${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+
+set(SwiftSynchronization_ARCH_SUBDIR arm64 CACHE STRING "")
+set(SwiftSynchronization_PLATFORM_SUBDIR iphonesimulator CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/apple-common.cmake")
diff --git a/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-iPhoneOS.cmake b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-iPhoneOS.cmake
new file mode 100644
index 0000000000000..2b5e04dac0611
--- /dev/null
+++ b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-iPhoneOS.cmake
@@ -0,0 +1,12 @@
+if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not defined")
+endif()
+
+set(CMAKE_C_COMPILER_TARGET "arm64-apple-ios${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "arm64-apple-ios${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+set(CMAKE_Swift_COMPILER_TARGET "arm64-apple-ios${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+
+set(SwiftSynchronization_ARCH_SUBDIR arm64 CACHE STRING "")
+set(SwiftSynchronization_PLATFORM_SUBDIR iphoneos CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/apple-common.cmake")
diff --git a/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64_32-WatchOS.cmake b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64_32-WatchOS.cmake
new file mode 100644
index 0000000000000..f50e5881a1fc5
--- /dev/null
+++ b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64_32-WatchOS.cmake
@@ -0,0 +1,12 @@
+if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not defined")
+endif()
+
+set(CMAKE_C_COMPILER_TARGET "arm64_32-apple-watchos${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "arm64_32-apple-watchos${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+set(CMAKE_Swift_COMPILER_TARGET "arm64_32-apple-watchos${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+
+set(SwiftSynchronization_ARCH_SUBDIR arm64_32 CACHE STRING "")
+set(SwiftSynchronization_PLATFORM_SUBDIR watchos CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/apple-common.cmake")
diff --git a/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64e-AppleTVOS.cmake b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64e-AppleTVOS.cmake
new file mode 100644
index 0000000000000..4cb83abac73b4
--- /dev/null
+++ b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64e-AppleTVOS.cmake
@@ -0,0 +1,12 @@
+if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not defined")
+endif()
+
+set(CMAKE_C_COMPILER_TARGET "arm64e-apple-tvos${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "arm64e-apple-tvos${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+set(CMAKE_Swift_COMPILER_TARGET "arm64e-apple-tvos${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+
+set(SwiftSynchronization_ARCH_SUBDIR arm64e CACHE STRING "")
+set(SwiftSynchronization_PLATFORM_SUBDIR appletvos CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/apple-common.cmake")
diff --git a/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64e-MacOSX.cmake b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64e-MacOSX.cmake
new file mode 100644
index 0000000000000..fc55849dde75e
--- /dev/null
+++ b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64e-MacOSX.cmake
@@ -0,0 +1,18 @@
+if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not defined")
+endif()
+
+if(NOT DEFINED SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET not defined")
+endif()
+
+set(CMAKE_C_COMPILER_TARGET "arm64e-apple-macosx${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "arm64e-apple-macosx${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+set(CMAKE_Swift_COMPILER_TARGET "arm64e-apple-macosx${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+
+set(SwiftSynchronization_ARCH_SUBDIR arm64e CACHE STRING "")
+set(SwiftSynchronization_PLATFORM_SUBDIR macosx CACHE STRING "")
+
+set(SwiftSynchronization_COMPILER_VARIANT_TARGET "arm64e-apple-ios${SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET}-macabi" CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/apple-common.cmake")
diff --git a/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64e-WatchOS.cmake b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64e-WatchOS.cmake
new file mode 100644
index 0000000000000..ee82d8970b384
--- /dev/null
+++ b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64e-WatchOS.cmake
@@ -0,0 +1,12 @@
+if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not defined")
+endif()
+
+set(CMAKE_C_COMPILER_TARGET "arm64e-apple-watchos${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "arm64e-apple-watchos${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+set(CMAKE_Swift_COMPILER_TARGET "arm64e-apple-watchos${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+
+set(SwiftSynchronization_ARCH_SUBDIR arm64e CACHE STRING "")
+set(SwiftSynchronization_PLATFORM_SUBDIR watchos CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/apple-common.cmake")
diff --git a/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64e-XROS.cmake b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64e-XROS.cmake
new file mode 100644
index 0000000000000..bd57c6bafe351
--- /dev/null
+++ b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64e-XROS.cmake
@@ -0,0 +1,12 @@
+if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not defined")
+endif()
+
+set(CMAKE_C_COMPILER_TARGET "arm64e-apple-xros${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "arm64e-apple-xros${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+set(CMAKE_Swift_COMPILER_TARGET "arm64e-apple-xros${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+
+set(SwiftSynchronization_ARCH_SUBDIR arm64e CACHE STRING "")
+set(SwiftSynchronization_PLATFORM_SUBDIR xros CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/apple-common.cmake")
diff --git a/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64e-iPhoneOS.cmake b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64e-iPhoneOS.cmake
new file mode 100644
index 0000000000000..93dac83fdf3b3
--- /dev/null
+++ b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64e-iPhoneOS.cmake
@@ -0,0 +1,12 @@
+if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not defined")
+endif()
+
+set(CMAKE_C_COMPILER_TARGET "arm64e-apple-ios${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "arm64e-apple-ios${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+set(CMAKE_Swift_COMPILER_TARGET "arm64e-apple-ios${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+
+set(SwiftSynchronization_ARCH_SUBDIR arm64e CACHE STRING "")
+set(SwiftSynchronization_PLATFORM_SUBDIR iphoneos CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/apple-common.cmake")
diff --git a/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/x86_64-AppleTVOS-simulator.cmake b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/x86_64-AppleTVOS-simulator.cmake
new file mode 100644
index 0000000000000..5219f6e6e7571
--- /dev/null
+++ b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/x86_64-AppleTVOS-simulator.cmake
@@ -0,0 +1,12 @@
+if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not defined")
+endif()
+
+set(CMAKE_C_COMPILER_TARGET "x86_64-apple-tvos${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "x86_64-apple-tvos${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+set(CMAKE_Swift_COMPILER_TARGET "x86_64-apple-tvos${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+
+set(SwiftSynchronization_ARCH_SUBDIR x86_64 CACHE STRING "")
+set(SwiftSynchronization_PLATFORM_SUBDIR appletvsimulator CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/apple-common.cmake")
diff --git a/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/x86_64-MacOSX.cmake b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/x86_64-MacOSX.cmake
new file mode 100644
index 0000000000000..8f0e265e9a99b
--- /dev/null
+++ b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/x86_64-MacOSX.cmake
@@ -0,0 +1,18 @@
+if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not defined")
+endif()
+
+if(NOT DEFINED SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET not defined")
+endif()
+
+set(CMAKE_C_COMPILER_TARGET "x86_64-apple-macosx${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "x86_64-apple-macosx${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+set(CMAKE_Swift_COMPILER_TARGET "x86_64-apple-macosx${CMAKE_OSX_DEPLOYMENT_TARGET}" CACHE STRING "")
+
+set(SwiftSynchronization_ARCH_SUBDIR x86_64 CACHE STRING "")
+set(SwiftSynchronization_PLATFORM_SUBDIR macosx CACHE STRING "")
+
+set(SwiftSynchronization_COMPILER_VARIANT_TARGET "x86_64-apple-ios${SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET}-macabi" CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/apple-common.cmake")
diff --git a/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/x86_64-WatchOS-simulator.cmake b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/x86_64-WatchOS-simulator.cmake
new file mode 100644
index 0000000000000..3c79d9826a06b
--- /dev/null
+++ b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/x86_64-WatchOS-simulator.cmake
@@ -0,0 +1,12 @@
+if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not defined")
+endif()
+
+set(CMAKE_C_COMPILER_TARGET "x86_64-apple-watchos${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "x86_64-apple-watchos${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+set(CMAKE_Swift_COMPILER_TARGET "x86_64-apple-watchos${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+
+set(SwiftSynchronization_ARCH_SUBDIR x86_64 CACHE STRING "")
+set(SwiftSynchronization_PLATFORM_SUBDIR watchsimulator CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/apple-common.cmake")
diff --git a/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/x86_64-XROS-simulator.cmake b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/x86_64-XROS-simulator.cmake
new file mode 100644
index 0000000000000..23f9cdcbc67e4
--- /dev/null
+++ b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/x86_64-XROS-simulator.cmake
@@ -0,0 +1,12 @@
+if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not defined")
+endif()
+
+set(CMAKE_C_COMPILER_TARGET "x86_64-apple-xros${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "x86_64-apple-xros${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+set(CMAKE_Swift_COMPILER_TARGET "x86_64-apple-xros${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+
+set(SwiftSynchronization_ARCH_SUBDIR x86_64 CACHE STRING "")
+set(SwiftSynchronization_PLATFORM_SUBDIR xrsimulator CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/apple-common.cmake")
diff --git a/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/x86_64-iPhoneOS-simulator.cmake b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/x86_64-iPhoneOS-simulator.cmake
new file mode 100644
index 0000000000000..8758aa157c97f
--- /dev/null
+++ b/Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/x86_64-iPhoneOS-simulator.cmake
@@ -0,0 +1,12 @@
+if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not defined")
+endif()
+
+set(CMAKE_C_COMPILER_TARGET "x86_64-apple-ios${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "x86_64-apple-ios${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+set(CMAKE_Swift_COMPILER_TARGET "x86_64-apple-ios${CMAKE_OSX_DEPLOYMENT_TARGET}-simulator" CACHE STRING "")
+
+set(SwiftSynchronization_ARCH_SUBDIR x86_64 CACHE STRING "")
+set(SwiftSynchronization_PLATFORM_SUBDIR iphonesimulator CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/apple-common.cmake")
diff --git a/Runtimes/cmake/toolchains/Darwin.toolchain.cmake b/Runtimes/cmake/toolchains/Darwin.toolchain.cmake
new file mode 100644
index 0000000000000..1cc1ddea00f33
--- /dev/null
+++ b/Runtimes/cmake/toolchains/Darwin.toolchain.cmake
@@ -0,0 +1,106 @@
+# Toolchain configuration when compiling for Darwin Platforms
+set(CMAKE_SYSTEM_NAME Darwin)
+set(CMAKE_Swift_COMPILER_WORKS YES)
+set(CMAKE_C_COMPILER_WORKS YES)
+set(CMAKE_CXX_COMPILER_WORKS YES)
+
+find_program(XCRUN_EXECUTABLE NAMES "xcrun" REQUIRED)
+
+if(NOT CMAKE_OSX_SYSROOT)
+  if(NOT DEFINED ENV{SDKROOT})
+    message(FATAL_ERROR "`CMAKE_OSX_SYSROOT` and the 'SDKROOT' environment variable are not set")
+  endif()
+
+  execute_process(COMMAND "${XCRUN_EXECUTABLE}" --show-sdk-path -sdk $ENV{SDKROOT}
+    OUTPUT_VARIABLE SDKROOT
+    ERROR_QUIET
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+  if(NOT EXISTS ${SDKROOT})
+    message(FATAL_ERROR "SDKROOT could not be detected!")
+  endif()
+
+  message(STATUS "Using SDKROOT: ${SDKROOT}")
+  set(CMAKE_OSX_SYSROOT "${SDKROOT}" CACHE FILEPATH "")
+endif()
+
+if(NOT CMAKE_C_COMPILER)
+  execute_process(COMMAND "${XCRUN_EXECUTABLE}" --sdk ${CMAKE_OSX_SYSROOT} --find clang
+    OUTPUT_VARIABLE CMAKE_C_COMPILER
+    ERROR_QUIET
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+  message(STATUS "Using C compiler ${CMAKE_C_COMPILER}")
+endif()
+
+if(NOT CMAKE_CXX_COMPILER)
+  execute_process(COMMAND "${XCRUN_EXECUTABLE}" --sdk ${CMAKE_OSX_SYSROOT} --find clang++
+    OUTPUT_VARIABLE CMAKE_CXX_COMPILER
+    ERROR_QUIET
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+  message(STATUS "Using CXX compiler ${CMAKE_CXX_COMPILER}")
+endif()
+
+if(NOT CMAKE_Swift_COMPILER)
+  execute_process(COMMAND "${XCRUN_EXECUTABLE}" --sdk ${CMAKE_OSX_SYSROOT} --find swiftc
+    OUTPUT_VARIABLE CMAKE_Swift_COMPILER
+    ERROR_QUIET
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+  message(STATUS "Using Swift compiler ${CMAKE_Swift_COMPILER}")
+endif()
+
+if(NOT CMAKE_AR)
+  execute_process(COMMAND "${XCRUN_EXECUTABLE}" --sdk ${CMAKE_OSX_SYSROOT} --find ar
+    OUTPUT_VARIABLE CMAKE_AR
+    ERROR_QUIET
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+  message(STATUS "Using ar ${CMAKE_AR}")
+endif()
+
+if(NOT CMAKE_RANLIB)
+  execute_process(COMMAND "${XCRUN_EXECUTABLE}" --sdk ${CMAKE_OSX_SYSROOT} --find ranlib
+    OUTPUT_VARIABLE CMAKE_RANLIB
+    ERROR_QUIET
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+  message(STATUS "Using ranlib ${CMAKE_RANLIB}")
+endif()
+
+if(NOT CMAKE_STRIP)
+  execute_process(COMMAND "${XCRUN_EXECUTABLE}" --sdk ${CMAKE_OSX_SYSROOT} --find strip
+    OUTPUT_VARIABLE CMAKE_STRIP
+    ERROR_QUIET
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+  message(STATUS "Using strip ${CMAKE_STRIP}")
+endif()
+
+if(NOT CMAKE_DSYMUTIL)
+  execute_process(COMMAND "${XCRUN_EXECUTABLE}" --sdk ${CMAKE_OSX_SYSROOT} --find dsymutil
+    OUTPUT_VARIABLE CMAKE_DSYMUTIL
+    ERROR_QUIET
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+  message(STATUS "Using dsymutil ${CMAKE_DSYMUTIL}")
+endif()
+
+if(NOT CMAKE_LIBTOOL)
+  execute_process(COMMAND "${XCRUN_EXECUTABLE}" --sdk ${CMAKE_OSX_SYSROOT} --find libtool
+   OUTPUT_VARIABLE CMAKE_LIBTOOL
+   ERROR_QUIET
+   OUTPUT_STRIP_TRAILING_WHITESPACE)
+  message(STATUS "Using libtool ${CMAKE_LIBTOOL}")
+endif()
+
+if(NOT CMAKE_CODESIGN)
+  execute_process(COMMAND "${XCRUN_EXECUTABLE}" --sdk ${CMAKE_OSX_SYSROOT} --find codesign
+   OUTPUT_VARIABLE CMAKE_CODESIGN
+   ERROR_QUIET
+   OUTPUT_STRIP_TRAILING_WHITESPACE)
+  message(STATUS "Using codesign ${CMAKE_CODESIGN}")
+endif()
+
+if(NOT CMAKE_CODESIGN_ALLOCATE)
+  execute_process(
+    COMMAND "${XCRUN_EXECUTABLE}" --sdk ${CMAKE_OSX_SYSROOT} --find codesign_allocate
+    OUTPUT_VARIABLE CMAKE_CODESIGN_ALLOCATE
+    ERROR_QUIET
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+  message(STATUS "Using codesign_allocate ${CMAKE_CODESIGN_ALLOCATE}")
+endif()


Reviews:
user: login: etcwilde
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-19T19:58:28Z
user: login: compnerd
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-19T20:58:03Z
user: login: etcwilde
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-20T20:16:49Z
user: login: justice-adams-apple
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-21T15:20:09Z
user: login: edymtt
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-23T18:24:44Z

Review comments:
diff_hunk: @@ -0,0 +1,18 @@
+if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not defined")
+endif()
+
+if(NOT DEFINED SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET)
+  message(WARNING "SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET not defined")
path: Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/arm64-MacOSX.cmake
user: login: etcwilde
body: We may want to make this an error instead of just a warning.

```suggestion
  message(SEND_ERROR "SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET not defined")
```
created_at: 2025-05-19T19:55:10Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,106 @@
+# Toolchain configuration when compiling for Darwin Platforms
path: Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/Darwin.toolchain.cmake
user: login: etcwilde
body: We can likely share the toolchain file since it's only setting up the compilers and such that are used while compiling.
I don't think that this is setting anything specific to the Synchronization library. It's just the cache files that are setting project-specific options.

Maybe stick it in `Runtimes/Supplemental/cmake/toolchains/Vendors/Apple/Darwin.toolchain.cmake`?

@compnerd, do you have any opinions on the file layout for the toolchain files?
created_at: 2025-05-19T19:57:38Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,18 @@
+if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
+  message(SEND_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET not defined")
+endif()
+
+if(NOT DEFINED SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET)
+  message(WARNING "SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET not defined")
path: Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/x86_64-MacOSX.cmake
user: login: etcwilde
body: Maybe make this an error?

```suggestion
  message(SEND_ERROR "SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET not defined")
```
created_at: 2025-05-19T19:58:19Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,106 @@
+# Toolchain configuration when compiling for Darwin Platforms
path: Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/Darwin.toolchain.cmake
user: login: compnerd
body: I suppose I am left wondering why are the caches in `Runtimes/Supplemental/cmake/toolchains/Vendors/Apple` rather than say `Runtimes/cmake/caches/` and `Runtimes/cmake/toolchains/`.
created_at: 2025-05-19T20:55:00Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,106 @@
+# Toolchain configuration when compiling for Darwin Platforms
+set(CMAKE_SYSTEM_NAME Darwin)
+set(CMAKE_Swift_COMPILER_WORKS YES)
+set(CMAKE_C_COMPILER_WORKS YES)
+set(CMAKE_CXX_COMPILER_WORKS YES)
+
+find_program(XCRUN_EXECUTABLE NAMES "xcrun" REQUIRED)
+
+if(NOT CMAKE_OSX_SYSROOT)
+  if(NOT DEFINED ENV{SDKROOT})
+    message(FATAL_ERROR "The 'SDKROOT' environment variable is not set")
path: Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/Darwin.toolchain.cmake
user: login: compnerd
body: ```suggestion
    message(FATAL_ERROR "`CMAKE_OSX_SYSROOT` and the 'SDKROOT' environment variable are not set")
```
created_at: 2025-05-19T20:56:03Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,106 @@
+# Toolchain configuration when compiling for Darwin Platforms
path: Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/Darwin.toolchain.cmake
user: login: etcwilde
body: I think keeping the project-specific cache files in a subdirectory of the project itself makes more sense. The `PROJECT_NAME` isn't set until the `project` call, so that would get kind of awkward.

As for the toolchain file, I think it's fine to put that in `Runtimes/cmake/toolchains/...`. For syncing things on our side, we won't be able to add it there and remove it from core in the same PR, but it shouldn't need to be in there for too long.
created_at: 2025-05-20T20:16:48Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,106 @@
+# Toolchain configuration when compiling for Darwin Platforms
path: Runtimes/Supplemental/Synchronization/cmake/caches/Vendors/Apple/Darwin.toolchain.cmake
user: login: justice-adams-apple
body: Moved to `Runtimes/cmake/toolchains/` for now 
created_at: 2025-05-21T15:20:09Z
author_association: CONTRIBUTOR

PR comments:
user: login: justice-adams-apple
created_at: 2025-05-19T19:46:47Z
body: @swift-ci please smoke test
author_association: CONTRIBUTOR
user: login: justice-adams-apple
created_at: 2025-05-21T15:20:21Z
body: @swift-ci please smoke test
author_association: CONTRIBUTOR
user: login: justice-adams-apple
created_at: 2025-05-21T19:34:51Z
body: @swift-ci please smoke test
author_association: CONTRIBUTOR
user: login: justice-adams-apple
created_at: 2025-05-22T15:26:47Z
body: @swift-ci please smoke test
author_association: CONTRIBUTOR