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')