@@ -79,15 +79,13 @@ def copy_libxml2_libs(build_sdk_path, dist_toolchain_path, target_triple):
79
79
class PackageSwiftSDKAction (Action ):
80
80
def __init__ (
81
81
self , options , snapshot_info : SnapshotInfo ,
82
- base_toolchain_path : str ,
83
82
target_toolchain_path : str ,
84
83
wasi_sysroot_path : str ,
85
84
swift_sdk_name : str ,
86
85
target_triple : str ,
87
86
):
88
87
super ().__init__ (options )
89
88
self .snapshot_info = snapshot_info
90
- self .base_toolchain_path = base_toolchain_path
91
89
self .target_toolchain_path = target_toolchain_path
92
90
self .wasi_sysroot_path = wasi_sysroot_path
93
91
self .swift_sdk_name = swift_sdk_name
@@ -98,7 +96,6 @@ class PackageSwiftSDKAction(Action):
98
96
copy_icu_libs (self .options .scheme , build_sdk_path , self .target_toolchain_path , self .target_triple )
99
97
copy_libxml2_libs (build_sdk_path , self .target_toolchain_path , self .target_triple )
100
98
self .make_swift_sdk (
101
- self .base_toolchain_path ,
102
99
self .target_toolchain_path ,
103
100
self .wasi_sysroot_path ,
104
101
self .swift_sdk_name ,
@@ -107,7 +104,6 @@ class PackageSwiftSDKAction(Action):
107
104
108
105
def make_swift_sdk (
109
106
self ,
110
- base_toolchain_path : str ,
111
107
target_toolchain_path : str ,
112
108
wasi_sysroot_path : str ,
113
109
swift_sdk_name : str ,
@@ -116,8 +112,6 @@ class PackageSwiftSDKAction(Action):
116
112
"""
117
113
Build the Swift SDK for WebAssembly.
118
114
119
- :param base_toolchain_path: The path to the base toolchain, which
120
- is an upstream toolchain downloaded from swift.org/download.
121
115
:param target_toolchain_path: The path to the target toolchain, which
122
116
contains the cross-compiled Swift standard library and SDK for
123
117
WebAssembly.
@@ -170,17 +164,6 @@ class PackageSwiftSDKAction(Action):
170
164
self .system (* zip_args )
171
165
os .chdir (old_cwd )
172
166
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
-
184
167
185
168
class CleanBuildArtifactAction (Action ):
186
169
def run (self ):
@@ -281,7 +264,6 @@ def main():
281
264
)
282
265
actions .append (PackageSwiftSDKAction (
283
266
options , snapshot_info ,
284
- base_toolchain_path = os .path .join (packaging_dir , 'base-snapshot' ),
285
267
target_toolchain_path = os .path .join (packaging_dir , 'target-toolchain' , target_triple ),
286
268
wasi_sysroot_path = derive_wasi_sysroot (options , packaging_dir , short_triple ),
287
269
swift_sdk_name = f"{ snapshot_info .swift_version } -{ target_triple } " ,
0 commit comments