From f62afdc98e3e32c8fe4fc6281b885336b64ed781 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 24 Jun 2024 11:05:54 +0200 Subject: [PATCH] Add `needs-ar` compiletest instruction --- src/tools/compiletest/src/header/needs.rs | 5 +++++ tests/run-make/invalid-library/rmake.rs | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/tools/compiletest/src/header/needs.rs b/src/tools/compiletest/src/header/needs.rs index b96832db67bed..1c3d970848f2a 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", + }, ]; let (name, comment) = match ln.split_once([':', ' ']) { 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};