From ccf31691ab6e3778bd0d4ac549ec4859dcd79bac Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Thu, 15 May 2025 17:27:28 +0900 Subject: [PATCH] Remove `base-snapshot` from the package-toolchain script --- tools/build/package-toolchain | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/tools/build/package-toolchain b/tools/build/package-toolchain index 2489f9a..aef73da 100755 --- a/tools/build/package-toolchain +++ b/tools/build/package-toolchain @@ -79,7 +79,6 @@ def copy_libxml2_libs(build_sdk_path, dist_toolchain_path, target_triple): class PackageSwiftSDKAction(Action): def __init__( self, options, snapshot_info: SnapshotInfo, - base_toolchain_path: str, target_toolchain_path: str, wasi_sysroot_path: str, swift_sdk_name: str, @@ -87,7 +86,6 @@ class PackageSwiftSDKAction(Action): ): super().__init__(options) self.snapshot_info = snapshot_info - self.base_toolchain_path = base_toolchain_path self.target_toolchain_path = target_toolchain_path self.wasi_sysroot_path = wasi_sysroot_path self.swift_sdk_name = swift_sdk_name @@ -98,7 +96,6 @@ class PackageSwiftSDKAction(Action): copy_icu_libs(self.options.scheme, build_sdk_path, self.target_toolchain_path, self.target_triple) copy_libxml2_libs(build_sdk_path, self.target_toolchain_path, self.target_triple) self.make_swift_sdk( - self.base_toolchain_path, self.target_toolchain_path, self.wasi_sysroot_path, self.swift_sdk_name, @@ -107,7 +104,6 @@ class PackageSwiftSDKAction(Action): def make_swift_sdk( self, - base_toolchain_path: str, target_toolchain_path: str, wasi_sysroot_path: str, swift_sdk_name: str, @@ -116,8 +112,6 @@ class PackageSwiftSDKAction(Action): """ Build the Swift SDK for WebAssembly. - :param base_toolchain_path: The path to the base toolchain, which - is an upstream toolchain downloaded from swift.org/download. :param target_toolchain_path: The path to the target toolchain, which contains the cross-compiled Swift standard library and SDK for WebAssembly. @@ -170,17 +164,6 @@ class PackageSwiftSDKAction(Action): self.system(*zip_args) os.chdir(old_cwd) - def get_default_target_triple(self, base_toolchain_path: str): - import subprocess - swift_frontend_path = os.path.join( - base_toolchain_path, "usr", "bin", "swift-frontend") - # Use subprocess instead of self.system to run it even in dry-run - output = subprocess.check_output( - [swift_frontend_path, "-print-target-info"], - universal_newlines=True) - info = json.loads(output) - return info["target"]["triple"] - class CleanBuildArtifactAction(Action): def run(self): @@ -281,7 +264,6 @@ def main(): ) actions.append(PackageSwiftSDKAction( options, snapshot_info, - base_toolchain_path=os.path.join(packaging_dir, 'base-snapshot'), target_toolchain_path=os.path.join(packaging_dir, 'target-toolchain', target_triple), wasi_sysroot_path=derive_wasi_sysroot(options, packaging_dir, short_triple), swift_sdk_name=f"{snapshot_info.swift_version}-{target_triple}",