File tree 1 file changed +5
-9
lines changed
src/bootstrap/src/core/build_steps
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 {
1838
1838
for f in builder. read_dir ( & src_libdir) {
1839
1839
let filename = f. file_name ( ) . into_string ( ) . unwrap ( ) ;
1840
1840
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`.
1845
1843
// We still need `std` for the initial stage as the bootstrap compiler may not
1846
1844
// 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)
1852
1848
if can_be_rustc_dep
1853
1849
&& ( is_dylib ( & filename) || is_debug_info ( & filename) )
1854
1850
&& !proc_macros. contains ( & filename)
You can’t perform that action at this time.
0 commit comments