Skip to content

Commit b22253c

Browse files
committed
Keep rustc's std copy
1 parent dd3f757 commit b22253c

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/bootstrap/src/core/build_steps/compile.rs

+1-12
Original file line numberDiff line numberDiff line change
@@ -1830,24 +1830,13 @@ impl Step for Assemble {
18301830
})
18311831
.collect::<HashSet<_>>();
18321832

1833-
let link_std_into_rustc_driver = builder.link_std_into_rustc_driver(target_compiler.host);
18341833
let sysroot = builder.sysroot(target_compiler);
18351834
let rustc_libdir = builder.rustc_libdir(target_compiler);
18361835
t!(fs::create_dir_all(&rustc_libdir));
18371836
let src_libdir = builder.sysroot_libdir(build_compiler, host);
18381837
for f in builder.read_dir(&src_libdir) {
18391838
let filename = f.file_name().into_string().unwrap();
1840-
1841-
// For the later stages which gets distributed avoid copying `std` if we're
1842-
// statically linking `std` into `rustc_driver`.
1843-
// We still need `std` for the initial stage as the bootstrap compiler may not
1844-
// have the new `rustc_private` linking behavior.
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)
1848-
if can_be_rustc_dep
1849-
&& (is_dylib(&filename) || is_debug_info(&filename))
1850-
&& !proc_macros.contains(&filename)
1839+
if (is_dylib(&filename) || is_debug_info(&filename)) && !proc_macros.contains(&filename)
18511840
{
18521841
builder.copy_link(&f.path(), &rustc_libdir.join(&filename));
18531842
}

0 commit comments

Comments
 (0)