From 2e5341aecd859aac6359923d70cd0e816d4e225f Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Sun, 4 Aug 2024 02:46:04 +0000 Subject: [PATCH] Enable msvc for no-duplicate-libs --- tests/run-make/no-duplicate-libs/main.rs | 6 +++--- tests/run-make/no-duplicate-libs/rmake.rs | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/run-make/no-duplicate-libs/main.rs b/tests/run-make/no-duplicate-libs/main.rs index b25ef35ada6..d8d5d58bc47 100644 --- a/tests/run-make/no-duplicate-libs/main.rs +++ b/tests/run-make/no-duplicate-libs/main.rs @@ -1,6 +1,6 @@ -#[link(name = "foo")] // linker should drop this library, no symbols used -#[link(name = "bar")] // symbol comes from this library -#[link(name = "foo")] // now linker picks up `foo` b/c `bar` library needs it +#[link(name = "foo", kind = "static")] // linker should drop this library, no symbols used +#[link(name = "bar", kind = "static")] // symbol comes from this library +#[link(name = "foo", kind = "static")] // now linker picks up `foo` b/c `bar` library needs it extern "C" { fn bar(); } diff --git a/tests/run-make/no-duplicate-libs/rmake.rs b/tests/run-make/no-duplicate-libs/rmake.rs index 469348e266c..b67067909b2 100644 --- a/tests/run-make/no-duplicate-libs/rmake.rs +++ b/tests/run-make/no-duplicate-libs/rmake.rs @@ -9,9 +9,6 @@ //@ ignore-cross-compile // Reason: the compiled binary is executed -//@ ignore-msvc -// Reason: native compilation results in an unresolved external symbol - use run_make_support::{build_native_static_lib, run, rustc}; fn main() {