@@ -79,15 +79,13 @@ def copy_libxml2_libs(build_sdk_path, dist_toolchain_path, target_triple):
7979class PackageSwiftSDKAction (Action ):
8080 def __init__ (
8181 self , options , snapshot_info : SnapshotInfo ,
82- base_toolchain_path : str ,
8382 target_toolchain_path : str ,
8483 wasi_sysroot_path : str ,
8584 swift_sdk_name : str ,
8685 target_triple : str ,
8786 ):
8887 super ().__init__ (options )
8988 self .snapshot_info = snapshot_info
90- self .base_toolchain_path = base_toolchain_path
9189 self .target_toolchain_path = target_toolchain_path
9290 self .wasi_sysroot_path = wasi_sysroot_path
9391 self .swift_sdk_name = swift_sdk_name
@@ -98,7 +96,6 @@ class PackageSwiftSDKAction(Action):
9896 copy_icu_libs (self .options .scheme , build_sdk_path , self .target_toolchain_path , self .target_triple )
9997 copy_libxml2_libs (build_sdk_path , self .target_toolchain_path , self .target_triple )
10098 self .make_swift_sdk (
101- self .base_toolchain_path ,
10299 self .target_toolchain_path ,
103100 self .wasi_sysroot_path ,
104101 self .swift_sdk_name ,
@@ -107,7 +104,6 @@ class PackageSwiftSDKAction(Action):
107104
108105 def make_swift_sdk (
109106 self ,
110- base_toolchain_path : str ,
111107 target_toolchain_path : str ,
112108 wasi_sysroot_path : str ,
113109 swift_sdk_name : str ,
@@ -116,8 +112,6 @@ class PackageSwiftSDKAction(Action):
116112 """
117113 Build the Swift SDK for WebAssembly.
118114
119- :param base_toolchain_path: The path to the base toolchain, which
120- is an upstream toolchain downloaded from swift.org/download.
121115 :param target_toolchain_path: The path to the target toolchain, which
122116 contains the cross-compiled Swift standard library and SDK for
123117 WebAssembly.
@@ -170,17 +164,6 @@ class PackageSwiftSDKAction(Action):
170164 self .system (* zip_args )
171165 os .chdir (old_cwd )
172166
173- def get_default_target_triple (self , base_toolchain_path : str ):
174- import subprocess
175- swift_frontend_path = os .path .join (
176- base_toolchain_path , "usr" , "bin" , "swift-frontend" )
177- # Use subprocess instead of self.system to run it even in dry-run
178- output = subprocess .check_output (
179- [swift_frontend_path , "-print-target-info" ],
180- universal_newlines = True )
181- info = json .loads (output )
182- return info ["target" ]["triple" ]
183-
184167
185168class CleanBuildArtifactAction (Action ):
186169 def run (self ):
@@ -281,7 +264,6 @@ def main():
281264 )
282265 actions .append (PackageSwiftSDKAction (
283266 options , snapshot_info ,
284- base_toolchain_path = os .path .join (packaging_dir , 'base-snapshot' ),
285267 target_toolchain_path = os .path .join (packaging_dir , 'target-toolchain' , target_triple ),
286268 wasi_sysroot_path = derive_wasi_sysroot (options , packaging_dir , short_triple ),
287269 swift_sdk_name = f"{ snapshot_info .swift_version } -{ target_triple } " ,
0 commit comments