Avoid dynamic linking to libstd in command-current-dir test

This commit is contained in:
Jakub Beránek 2024-09-09 10:24:35 +02:00 committed by Jakub Beránek
parent 2cf155924f
commit f59c8fffe3
2 changed files with 3 additions and 2 deletions

View File

@ -1928,8 +1928,8 @@ fn run(self, builder: &Builder<'_>) -> Compiler {
let is_dylib_or_debug = is_dylib(&filename) || is_debug_info(&filename); let is_dylib_or_debug = is_dylib(&filename) || is_debug_info(&filename);
// If we link statically to stdlib, do not copy the libstd dynamic library file // If we link statically to stdlib, do not copy the libstd dynamic library file
// Currently, we do not avoid the copy on Windows, as it seems to be causing issues in // FIXME: Also do this for Windows once incremental post-optimization stage0 tests
// 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 let can_be_rustc_dynamic_dep = if builder
.link_std_into_rustc_driver(target_compiler.host) .link_std_into_rustc_driver(target_compiler.host)
&& !target_compiler.host.is_windows() && !target_compiler.host.is_windows()

View File

@ -1,4 +1,5 @@
//@ run-pass //@ run-pass
//@ no-prefer-dynamic We move the binary around, so do not depend dynamically on libstd
//@ ignore-wasm32 no processes //@ ignore-wasm32 no processes
//@ ignore-sgx no processes //@ ignore-sgx no processes
//@ ignore-fuchsia Needs directory creation privilege //@ ignore-fuchsia Needs directory creation privilege