diff --git a/src/tools/compiletest/src/header/needs.rs b/src/tools/compiletest/src/header/needs.rs index 5b2665f7d0ba7..06423697ee7d1 100644 --- a/src/tools/compiletest/src/header/needs.rs +++ b/src/tools/compiletest/src/header/needs.rs @@ -144,6 +144,11 @@ pub(super) fn handle_needs( condition: config.runner.as_ref().is_some_and(|r| r.contains("wasmtime")), ignore_reason: "ignored when wasmtime runner is not available", }, + Need { + name: "needs-ar", + condition: !config.target.contains("msvc"), + ignore_reason: "ignored when ar command is not available", + }, Need { name: "needs-symlink", condition: cache.symlinks, diff --git a/tests/run-make/invalid-library/rmake.rs b/tests/run-make/invalid-library/rmake.rs index e76b3f3b5d223..310c916f82ce3 100644 --- a/tests/run-make/invalid-library/rmake.rs +++ b/tests/run-make/invalid-library/rmake.rs @@ -1,3 +1,5 @@ +//@ needs-ar + use run_make_support::fs_wrapper::create_file; use run_make_support::{ar_command, rustc};