From 22cac4688b13add278e4ed25d3cd9db5ab0569aa 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 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};