@@ -37,11 +37,11 @@ class SnapshotInfo:
37
37
return f"{ self .artifact_name } .artifactbundle.zip"
38
38
39
39
40
- def derive_wasi_sysroot (options , packaging_dir : str ) -> str :
40
+ def derive_wasi_sysroot (options , packaging_dir : str , target_triple : str ) -> str :
41
41
if options .download_wasi_sysroot :
42
42
return os .path .join ('..' , 'build-sdk' , 'wasi-sysroot' )
43
43
else :
44
- return os .path .join (packaging_dir , 'wasi-sysroot' )
44
+ return os .path .join (packaging_dir , 'wasi-sysroot' , target_triple )
45
45
46
46
47
47
def copy_icu_libs (build_sdk_path , dist_toolchain_path ):
@@ -116,7 +116,7 @@ class PackageAction(Action):
116
116
os .remove (swift_driver_path )
117
117
118
118
# Select wasi-sysroot
119
- wasi_sysroot_path = derive_wasi_sysroot (self .options , packaging_dir )
119
+ wasi_sysroot_path = derive_wasi_sysroot (self .options , packaging_dir , 'wasm32-wasi' )
120
120
print ("=====> Using wasi-sysroot from {}" .format (wasi_sysroot_path ))
121
121
122
122
# Now dist toolchain always has cross compiler regardless of whether
@@ -439,8 +439,9 @@ def main():
439
439
os .path .dirname (__file__ ), '..' , '..' , '..' , 'build' , 'Packaging' )
440
440
441
441
toolchain_channel = derive_toolchain_channel (options .scheme )
442
- for target_triple in [
443
- "wasm32-unknown-wasi" , "wasm32-unknown-wasip1-threads"
442
+ for target_triple , short_triple in [
443
+ ["wasm32-unknown-wasi" , "wasm32-wasi" ],
444
+ ["wasm32-unknown-wasip1-threads" , "wasm32-wasip1-threads" ]
444
445
]:
445
446
snapshot_info = SnapshotInfo (
446
447
now .year , now .month , now .day ,
@@ -454,7 +455,7 @@ def main():
454
455
base_toolchain_path = os .path .join (packaging_dir , 'base-snapshot' ),
455
456
host_toolchain_path = None ,
456
457
target_toolchain_path = os .path .join (packaging_dir , 'target-toolchain' , target_triple ),
457
- wasi_sysroot_path = derive_wasi_sysroot (options , packaging_dir ),
458
+ wasi_sysroot_path = derive_wasi_sysroot (options , packaging_dir , short_triple ),
458
459
swift_sdk_name = f"{ snapshot_info .swift_version } -{ target_triple } " ,
459
460
target_triple = target_triple ,
460
461
))
0 commit comments