From b1fd4a7a49f9558b00aface02d6a5c5ccfa59d4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Miku=C5=82a?= Date: Tue, 23 Apr 2024 20:47:21 +0200 Subject: [PATCH] Skip dlltool tests on non `*windows-gnu` targets --- src/tools/compiletest/src/header/needs.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tools/compiletest/src/header/needs.rs b/src/tools/compiletest/src/header/needs.rs index 20d3fd4734338..7bc7e4b868038 100644 --- a/src/tools/compiletest/src/header/needs.rs +++ b/src/tools/compiletest/src/header/needs.rs @@ -261,6 +261,11 @@ fn find_dlltool(config: &Config) -> bool { let path = std::env::var_os("PATH").expect("missing PATH environment variable"); let path = std::env::split_paths(&path).collect::>(); + // dlltool is used ony by GNU based `*-*-windows-gnu` + if !(config.matches_os("windows") && config.matches_env("gnu") && config.matches_abi("")) { + return false; + } + // On Windows, dlltool.exe is used for all architectures. // For non-Windows, there are architecture specific dlltool binaries. let dlltool_found = if cfg!(windows) {