From 2271e7ac26008489698acfddafabe175181657b5 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Tue, 19 Aug 2025 14:11:28 +0100 Subject: [PATCH] wasmswiftsdk.py: build the generator with the freshly built toolchain As Swift CI nodes use Swift 5.9 and Swift 5.10, and as of https://github.com/swiftlang/swift-sdk-generator/pull/227 Swift SDK Generator is no longer tested with Swift 5.9 and 5.10, we should build it with the freshly built toolchain. This will also unblock bump of `swift-tools-version` to 6.0 in the generator's package https://github.com/swiftlang/swift-sdk-generator/pull/237 --- .../swift_build_support/products/wasmswiftsdk.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/utils/swift_build_support/swift_build_support/products/wasmswiftsdk.py b/utils/swift_build_support/swift_build_support/products/wasmswiftsdk.py index e39da2ed8d747..2c37622cc2306 100644 --- a/utils/swift_build_support/swift_build_support/products/wasmswiftsdk.py +++ b/utils/swift_build_support/swift_build_support/products/wasmswiftsdk.py @@ -279,9 +279,7 @@ def build(self, host_target): if build_sdk: target_packages.append((swift_host_triple, wasi_sysroot, package_path)) - swiftc_path = os.path.abspath(self.toolchain.swiftc) - toolchain_path = os.path.dirname(os.path.dirname(swiftc_path)) - swift_run = os.path.join(toolchain_path, 'bin', 'swift-run') + swift_run = os.path.join(self.install_toolchain_path(host_target), "bin", "swift-run") swift_version = os.environ.get('TOOLCHAIN_VERSION', 'swift-DEVELOPMENT-SNAPSHOT')