about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2024-09-09 10:24:35 +0200
committerJakub Beránek <jakub.beranek@vsb.cz>2024-10-04 15:34:31 +0200
commitf59c8fffe3c821f93ced12e628404f9ba7eec3bf (patch)
treebd3e429057e662cd509f7bd36c0c22a330c6fcd3
parent2cf155924fb6f7d4f85f49c0642b2d40b22a13b1 (diff)
downloadrust-f59c8fffe3c821f93ced12e628404f9ba7eec3bf.tar.gz
rust-f59c8fffe3c821f93ced12e628404f9ba7eec3bf.zip
Avoid dynamic linking to libstd in `command-current-dir` test
-rw-r--r--src/bootstrap/src/core/build_steps/compile.rs4
-rw-r--r--tests/ui/command/command-current-dir.rs1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
index c274bcc2df7..b5be7d841dd 100644
--- a/src/bootstrap/src/core/build_steps/compile.rs
+++ b/src/bootstrap/src/core/build_steps/compile.rs
@@ -1928,8 +1928,8 @@ impl Step for Assemble {
             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
-            // Currently, we do not avoid the copy on Windows, as it seems to be causing issues in
-            // post-optimization stage0 tests.
+            // 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()
diff --git a/tests/ui/command/command-current-dir.rs b/tests/ui/command/command-current-dir.rs
index 95c16bce6e8..23269e41231 100644
--- a/tests/ui/command/command-current-dir.rs
+++ b/tests/ui/command/command-current-dir.rs
@@ -1,4 +1,5 @@
 //@ run-pass
+//@ no-prefer-dynamic We move the binary around, so do not depend dynamically on libstd
 //@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 //@ ignore-fuchsia Needs directory creation privilege