@@ -295,6 +295,44 @@ fn make_win_dist(plat_root: &Path, target: TargetSelection, builder: &Builder<'_
295295 }
296296}
297297
298+ fn make_win_llvm_dist ( plat_root : & Path , target : TargetSelection , builder : & Builder < ' _ > ) {
299+ if builder. config . dry_run ( ) {
300+ return ;
301+ }
302+
303+ let ( _, lib_path) = get_cc_search_dirs ( target, builder) ;
304+
305+ // Libraries necessary to link the windows-gnullvm toolchains.
306+ // System libraries will be preferred if they are available (see #67429).
307+ let target_libs = [
308+ // MinGW libs
309+ "libunwind.a" ,
310+ "libunwind.dll.a" ,
311+ "libmingw32.a" ,
312+ "libmingwex.a" ,
313+ "libmsvcrt.a" ,
314+ // Windows import libs, remove them once std transitions to raw-dylib
315+ "libkernel32.a" ,
316+ "libuser32.a" ,
317+ "libntdll.a" ,
318+ "libuserenv.a" ,
319+ "libws2_32.a" ,
320+ "libdbghelp.a" ,
321+ ] ;
322+
323+ //Find mingw artifacts we want to bundle
324+ let target_libs = find_files ( & target_libs, & lib_path) ;
325+
326+ //Copy platform libs to platform-specific lib directory
327+ let plat_target_lib_self_contained_dir =
328+ plat_root. join ( "lib/rustlib" ) . join ( target) . join ( "lib/self-contained" ) ;
329+ fs:: create_dir_all ( & plat_target_lib_self_contained_dir)
330+ . expect ( "creating plat_target_lib_self_contained_dir failed" ) ;
331+ for src in target_libs {
332+ builder. copy_link_to_folder ( & src, & plat_target_lib_self_contained_dir) ;
333+ }
334+ }
335+
298336fn runtime_dll_dist ( rust_root : & Path , target : TargetSelection , builder : & Builder < ' _ > ) {
299337 if builder. config . dry_run ( ) {
300338 return ;
@@ -344,44 +382,6 @@ fn runtime_dll_dist(rust_root: &Path, target: TargetSelection, builder: &Builder
344382 }
345383}
346384
347- fn make_win_llvm_dist ( plat_root : & Path , target : TargetSelection , builder : & Builder < ' _ > ) {
348- if builder. config . dry_run ( ) {
349- return ;
350- }
351-
352- let ( _, lib_path) = get_cc_search_dirs ( target, builder) ;
353-
354- // Libraries necessary to link the windows-gnullvm toolchains.
355- // System libraries will be preferred if they are available (see #67429).
356- let target_libs = [
357- // MinGW libs
358- "libunwind.a" ,
359- "libunwind.dll.a" ,
360- "libmingw32.a" ,
361- "libmingwex.a" ,
362- "libmsvcrt.a" ,
363- // Windows import libs, remove them once std transitions to raw-dylib
364- "libkernel32.a" ,
365- "libuser32.a" ,
366- "libntdll.a" ,
367- "libuserenv.a" ,
368- "libws2_32.a" ,
369- "libdbghelp.a" ,
370- ] ;
371-
372- //Find mingw artifacts we want to bundle
373- let target_libs = find_files ( & target_libs, & lib_path) ;
374-
375- //Copy platform libs to platform-specific lib directory
376- let plat_target_lib_self_contained_dir =
377- plat_root. join ( "lib/rustlib" ) . join ( target) . join ( "lib/self-contained" ) ;
378- fs:: create_dir_all ( & plat_target_lib_self_contained_dir)
379- . expect ( "creating plat_target_lib_self_contained_dir failed" ) ;
380- for src in target_libs {
381- builder. copy_link_to_folder ( & src, & plat_target_lib_self_contained_dir) ;
382- }
383- }
384-
385385fn get_cc_search_dirs (
386386 target : TargetSelection ,
387387 builder : & Builder < ' _ > ,
0 commit comments