From f59c8fffe3c821f93ced12e628404f9ba7eec3bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Mon, 9 Sep 2024 10:24:35 +0200 Subject: [PATCH] Avoid dynamic linking to libstd in `command-current-dir` test --- src/bootstrap/src/core/build_steps/compile.rs | 4 ++-- tests/ui/command/command-current-dir.rs | 1 + 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 c274bcc2df73d..b5be7d841dd93 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 95c16bce6e8b8..23269e4123182 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