Don't unnecessarily copy rustc_std_workspace_std into the sysroot

This commit is contained in:
bjorn3 2022-04-29 19:47:43 +02:00
parent 2e65a8f2ca
commit 88d058fef3

View file

@ -137,7 +137,8 @@ pub(crate) fn build_sysroot(
// libstd.
for file in fs::read_dir(host_rustlib_lib).unwrap() {
let file = file.unwrap().path();
if file.file_name().unwrap().to_str().unwrap().contains("std-") {
let filename = file.file_name().unwrap().to_str().unwrap();
if filename.contains("std-") && !filename.contains(".rlib") {
try_hard_link(&file, target_dir.join("lib").join(file.file_name().unwrap()));
}
}