@@ -44,7 +44,10 @@ def derive_wasi_sysroot(options, packaging_dir: str, target_triple: str) -> str:
4444 return os .path .join (packaging_dir , 'wasi-sysroot' , target_triple )
4545
4646
47- def copy_icu_libs (build_sdk_path , dist_toolchain_path , target_triple ):
47+ def copy_icu_libs (scheme , build_sdk_path , dist_toolchain_path , target_triple ):
48+ if scheme not in ["release-5.9" , "release-5.10" , "release-6.0" ]:
49+ # We don't need to copy ICU libraries for recent channels
50+ return
4851 import shutil
4952 icu_lib_dir = os .path .join (build_sdk_path , f"icu-{ target_triple } " , 'lib' )
5053 if not os .path .exists (icu_lib_dir ):
@@ -96,7 +99,7 @@ class PackageAction(Action):
9699 print (f"=====> Copying base snapshot { base_toolchain_path } to { dist_toolchain_path } " )
97100 self .rsync ("-a" , base_toolchain_path + "/" , dist_toolchain_path )
98101
99- copy_icu_libs (build_sdk_path , target_toolchain_path , self .target_triple )
102+ copy_icu_libs (self . options . scheme , build_sdk_path , target_toolchain_path , self .target_triple )
100103 copy_libxml2_libs (build_sdk_path , target_toolchain_path , self .target_triple )
101104 # Copying target stdlib to dist toolchain, and cross compiler if
102105 # host compiler is built with patches by ourselves.
@@ -215,7 +218,7 @@ class PackageSwiftSDKAction(Action):
215218
216219 def run (self ):
217220 build_sdk_path = os .path .join ('..' , 'build-sdk' )
218- copy_icu_libs (build_sdk_path , self .target_toolchain_path , self .target_triple )
221+ copy_icu_libs (self . options . scheme , build_sdk_path , self .target_toolchain_path , self .target_triple )
219222 copy_libxml2_libs (build_sdk_path , self .target_toolchain_path , self .target_triple )
220223 self .make_swift_sdk (
221224 self .base_toolchain_path ,
0 commit comments