about summary refs log tree commit diff
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2024-06-11 09:14:36 +0100
committerGitHub <noreply@github.com>2024-06-11 09:14:36 +0100
commitafce88e2e32d0bdc7fdae357543ab4a317952839 (patch)
tree1faf3c8103952768f17de15eaca20787aed7d608
parent61207daf867c757ae4c6c7f51654dc3f5d59f8e0 (diff)
parent3923b686c727ceaad7a6a9139c5f0d73e29a21e7 (diff)
downloadrust-afce88e2e32d0bdc7fdae357543ab4a317952839.tar.gz
rust-afce88e2e32d0bdc7fdae357543ab4a317952839.zip
Rollup merge of #126257 - Zalathar:needs-matching-clang, r=jieyouxu
Rename `needs-matching-clang` to `needs-force-clang-based-tests`

This header is much more restrictive than its old name would suggest. As a result, most of the tests that use it don't actually run in any CI jobs.

Mitigation for #126180, though at some point we still need to go back fix the affected tests to actually run.
-rw-r--r--src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile2
-rw-r--r--src/tools/compiletest/src/header.rs2
-rw-r--r--src/tools/compiletest/src/header/needs.rs4
-rw-r--r--tests/run-make/cross-lang-lto-clang/Makefile2
-rw-r--r--tests/run-make/cross-lang-lto-pgo-smoketest/Makefile5
-rw-r--r--tests/run-make/cross-lang-lto-riscv-abi/rmake.rs5
-rw-r--r--tests/run-make/issue-84395-lto-embed-bitcode/Makefile5
-rw-r--r--tests/run-make/wasm-override-linker/Makefile5
8 files changed, 21 insertions, 9 deletions
diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile
index 64a1fb093b4..fa31801269a 100644
--- a/src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile
+++ b/src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile
@@ -47,7 +47,7 @@ ENV RUST_CONFIGURE_ARGS \
 # This job appears to be checking two separate things:
 # - That we can build the compiler with `--enable-debug`
 #   (without necessarily testing the result).
-# - That the tests with `//@ needs-matching-clang` pass, since they
+# - That the tests with `//@ needs-force-clang-based-tests` pass, since they
 #   don't run by default unless RUSTBUILD_FORCE_CLANG_BASED_TESTS is set.
 #   - FIXME(https://github.com/rust-lang/rust/pull/126155#issuecomment-2156314273):
 #     Currently we only run the subset of tests with "clang" in their name.
diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs
index fd4ab72bbf4..a5475a158de 100644
--- a/src/tools/compiletest/src/header.rs
+++ b/src/tools/compiletest/src/header.rs
@@ -854,9 +854,9 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
     "needs-asm-support",
     "needs-dlltool",
     "needs-dynamic-linking",
+    "needs-force-clang-based-tests",
     "needs-git-hash",
     "needs-llvm-components",
-    "needs-matching-clang",
     "needs-profiler-support",
     "needs-relocation-model-pic",
     "needs-run-enabled",
diff --git a/src/tools/compiletest/src/header/needs.rs b/src/tools/compiletest/src/header/needs.rs
index 7bc7e4b8680..b96832db67b 100644
--- a/src/tools/compiletest/src/header/needs.rs
+++ b/src/tools/compiletest/src/header/needs.rs
@@ -100,9 +100,9 @@ pub(super) fn handle_needs(
             ignore_reason: "ignored when profiler support is disabled",
         },
         Need {
-            name: "needs-matching-clang",
+            name: "needs-force-clang-based-tests",
             condition: config.run_clang_based_tests_with.is_some(),
-            ignore_reason: "ignored when the used clang does not match the built LLVM",
+            ignore_reason: "ignored when RUSTBUILD_FORCE_CLANG_BASED_TESTS is not set",
         },
         Need {
             name: "needs-xray",
diff --git a/tests/run-make/cross-lang-lto-clang/Makefile b/tests/run-make/cross-lang-lto-clang/Makefile
index acaebf439d6..acf49c8f5c8 100644
--- a/tests/run-make/cross-lang-lto-clang/Makefile
+++ b/tests/run-make/cross-lang-lto-clang/Makefile
@@ -1,4 +1,4 @@
-# needs-matching-clang
+# needs-force-clang-based-tests
 
 # This test makes sure that cross-language inlining actually works by checking
 # the generated machine code.
diff --git a/tests/run-make/cross-lang-lto-pgo-smoketest/Makefile b/tests/run-make/cross-lang-lto-pgo-smoketest/Makefile
index 70085d9bde1..738e23f9c66 100644
--- a/tests/run-make/cross-lang-lto-pgo-smoketest/Makefile
+++ b/tests/run-make/cross-lang-lto-pgo-smoketest/Makefile
@@ -1,4 +1,7 @@
-# needs-matching-clang
+# needs-force-clang-based-tests
+
+# FIXME(#126180): This test doesn't actually run anywhere, because the only
+# CI job that sets RUSTBUILD_FORCE_CLANG_BASED_TESTS runs very few tests.
 
 # This test makes sure that cross-language inlining can be used in conjunction
 # with profile-guided optimization. The test only tests that the whole workflow
diff --git a/tests/run-make/cross-lang-lto-riscv-abi/rmake.rs b/tests/run-make/cross-lang-lto-riscv-abi/rmake.rs
index 04afc92bf7e..f40da662128 100644
--- a/tests/run-make/cross-lang-lto-riscv-abi/rmake.rs
+++ b/tests/run-make/cross-lang-lto-riscv-abi/rmake.rs
@@ -1,8 +1,11 @@
 //! Make sure that cross-language LTO works on riscv targets,
 //! which requires extra `target-abi` metadata to be emitted.
-//@ needs-matching-clang
+//@ needs-force-clang-based-tests
 //@ needs-llvm-components riscv
 
+// FIXME(#126180): This test doesn't actually run anywhere, because the only
+// CI job that sets RUSTBUILD_FORCE_CLANG_BASED_TESTS runs very few tests.
+
 use run_make_support::{bin_name, clang, llvm_readobj, rustc};
 use std::{
     env,
diff --git a/tests/run-make/issue-84395-lto-embed-bitcode/Makefile b/tests/run-make/issue-84395-lto-embed-bitcode/Makefile
index 95c8d08a18b..aabe90754a6 100644
--- a/tests/run-make/issue-84395-lto-embed-bitcode/Makefile
+++ b/tests/run-make/issue-84395-lto-embed-bitcode/Makefile
@@ -1,4 +1,7 @@
-# needs-matching-clang
+# needs-force-clang-based-tests
+
+# FIXME(#126180): This test doesn't actually run anywhere, because the only
+# CI job that sets RUSTBUILD_FORCE_CLANG_BASED_TESTS runs very few tests.
 
 # This test makes sure the embed bitcode in elf created with
 # lto-embed-bitcode=optimized is valid llvm BC module.
diff --git a/tests/run-make/wasm-override-linker/Makefile b/tests/run-make/wasm-override-linker/Makefile
index 52339f9261c..1a01a574dee 100644
--- a/tests/run-make/wasm-override-linker/Makefile
+++ b/tests/run-make/wasm-override-linker/Makefile
@@ -1,4 +1,7 @@
-# needs-matching-clang
+# needs-force-clang-based-tests
+
+# FIXME(#126180): This test doesn't actually run anywhere, because the only
+# CI job that sets RUSTBUILD_FORCE_CLANG_BASED_TESTS runs very few tests.
 
 include ../tools.mk