@@ -436,43 +436,6 @@ impl Step for StdLink {
436
436
let libdir = builder. sysroot_libdir ( target_compiler, target) ;
437
437
let hostdir = builder. sysroot_libdir ( target_compiler, compiler. host ) ;
438
438
add_to_sysroot ( builder, & libdir, & hostdir, & libstd_stamp ( builder, compiler, target) ) ;
439
-
440
- if compiler. stage == 0 {
441
- // special handling for stage0, to make `rustup toolchain link` and `x dist --stage 0`
442
- // work for stage0-sysroot
443
-
444
- // copy bin files from stage0/bin to stage0-sysroot/bin
445
- let sysroot = builder. out . join ( & compiler. host . triple ) . join ( "stage0-sysroot" ) ;
446
-
447
- let host = compiler. host . triple ;
448
- let stage0_bin_dir = builder. out . join ( & host) . join ( "stage0/bin" ) ;
449
- let sysroot_bin_dir = sysroot. join ( "bin" ) ;
450
- t ! ( fs:: create_dir_all( & sysroot_bin_dir) ) ;
451
- builder. cp_r ( & stage0_bin_dir, & sysroot_bin_dir) ;
452
-
453
- // copy all *.so files from stage0/lib to stage0-sysroot/lib
454
- let stage0_lib_dir = builder. out . join ( & host) . join ( "stage0/lib" ) ;
455
- if let Ok ( files) = fs:: read_dir ( & stage0_lib_dir) {
456
- for file in files {
457
- let file = t ! ( file) ;
458
- let path = file. path ( ) ;
459
- if path. is_file ( ) && is_dylib ( & file. file_name ( ) . into_string ( ) . unwrap ( ) ) {
460
- builder. copy ( & path, & sysroot. join ( "lib" ) . join ( path. file_name ( ) . unwrap ( ) ) ) ;
461
- }
462
- }
463
- }
464
-
465
- // copy codegen-backends from stage0
466
- let sysroot_codegen_backends = builder. sysroot_codegen_backends ( compiler) ;
467
- t ! ( fs:: create_dir_all( & sysroot_codegen_backends) ) ;
468
- let stage0_codegen_backends = builder
469
- . out
470
- . join ( & host)
471
- . join ( "stage0/lib/rustlib" )
472
- . join ( & host)
473
- . join ( "codegen-backends" ) ;
474
- builder. cp_r ( & stage0_codegen_backends, & sysroot_codegen_backends) ;
475
- }
476
439
}
477
440
}
478
441
0 commit comments