File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
src/bootstrap/src/core/build_steps Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -1838,17 +1838,13 @@ impl Step for Assemble {
18381838 for f in builder. read_dir ( & src_libdir) {
18391839 let filename = f. file_name ( ) . into_string ( ) . unwrap ( ) ;
18401840
1841- // For the later stages which gets distributed only copy over the
1842- // `rustc_driver` library so we don't end up with an extra copy of `std`.
1843- // If we're not statically linking `std` into `rustc_driver`, just copy every library
1844- // to ensure `std` is included.
1841+ // For the later stages which gets distributed avoid copying `std` if we're
1842+ // statically linking `std` into `rustc_driver`.
18451843 // We still need `std` for the initial stage as the bootstrap compiler may not
18461844 // have the new `rustc_private` linking behavior.
1847- let can_be_rustc_dep = filename. starts_with ( "rustc_driver-" )
1848- || filename. starts_with ( "librustc_driver-" )
1849- || build_compiler. stage == 0
1850- || !link_std_into_rustc_driver;
1851-
1845+ let is_std = filename. starts_with ( "std-" ) || filename. starts_with ( "libstd-" ) ;
1846+ let can_be_rustc_dep =
1847+ !is_std || !link_std_into_rustc_driver || build_compiler. stage == 0 ; // cfg(bootstrap)
18521848 if can_be_rustc_dep
18531849 && ( is_dylib ( & filename) || is_debug_info ( & filename) )
18541850 && !proc_macros. contains ( & filename)
You can’t perform that action at this time.
0 commit comments