From 0cf9a0b6cb1cc13113e29a0c8266774a92dcb34d Mon Sep 17 00:00:00 2001 From: "Takuto NAKAMURA (Kyome)" Date: Sun, 18 Jan 2026 01:20:15 +0900 Subject: [PATCH] Fix simulator build on Xcode 26 / macOS 26 Xcode 26's macOS 26 SDK automatically imports _DarwinFoundation modules, which are incompatible with Embedded Swift mode. This causes build failures with errors like: error: module '_DarwinFoundation1' cannot be imported in embedded Swift mode This fix explicitly sets the target to arm64-apple-macos14 in the simulator toolset, which avoids the macOS 26 SDK's implicit Foundation imports while still producing a working simulator binary. Changes: - Add swiftCompiler section with explicit target and flags to disable implicit module imports - Add explicit target to cCompiler section Co-Authored-By: Claude Opus 4.5 --- Toolsets/toolset_simulator_macos.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Toolsets/toolset_simulator_macos.json b/Toolsets/toolset_simulator_macos.json index 92336a5b..e0fbc7e9 100644 --- a/Toolsets/toolset_simulator_macos.json +++ b/Toolsets/toolset_simulator_macos.json @@ -1,7 +1,15 @@ { "schemaVersion": "1.0", + "swiftCompiler": { + "extraCLIOptions": [ + "-target", "arm64-apple-macos14", + "-Xfrontend", "-disable-implicit-concurrency-module-import", + "-Xfrontend", "-disable-implicit-string-processing-module-import" + ] + }, "cCompiler": { "extraCLIOptions": [ + "-target", "arm64-apple-macos14", "-DTARGET_SIMULATOR=1" ] },