Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions src/bootstrap/src/core/build_steps/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2350,17 +2350,13 @@ impl CommandLineStep for Assemble {
let is_dylib_or_debug = is_dylib(&f.path()) || is_debug_info(&filename);

// If we link statically to stdlib, do not copy the libstd dynamic library file
// FIXME: Also do this for Windows once incremental post-optimization stage0 tests
// work without std.dll (see https://github.com/rust-lang/rust/pull/131188).
let can_be_rustc_dynamic_dep = if builder
.link_std_into_rustc_driver(target_compiler.host)
&& !target_compiler.host.is_windows()
{
let is_std = filename.starts_with("std-") || filename.starts_with("libstd-");
!is_std
} else {
true
};
let can_be_rustc_dynamic_dep =
if builder.link_std_into_rustc_driver(target_compiler.host) {
let is_std = filename.starts_with("std-") || filename.starts_with("libstd-");
!is_std
} else {
true
};

if is_dylib_or_debug && can_be_rustc_dynamic_dep && !is_proc_macro {
builder.copy_link(&f.path(), &rustc_libdir.join(&filename), FileType::Regular);
Expand Down
Loading