From d80ce2132ec94f2da6cf2281728bf2f47e40382f Mon Sep 17 00:00:00 2001 From: Tim Neumann Date: Thu, 5 Dec 2024 12:38:15 +0100 Subject: [PATCH] Normalize target-cpus.rs stdout test for LLVM changes --- src/tools/compiletest/src/directive-list.rs | 1 + tests/ui/codegen/target-cpus.rs | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/tools/compiletest/src/directive-list.rs b/src/tools/compiletest/src/directive-list.rs index 5638d47189026..73f258e54e8a8 100644 --- a/src/tools/compiletest/src/directive-list.rs +++ b/src/tools/compiletest/src/directive-list.rs @@ -163,6 +163,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[ "normalize-stderr-32bit", "normalize-stderr-64bit", "normalize-stderr-test", + "normalize-stdout", "normalize-stdout-test", "only-16bit", "only-32bit", diff --git a/tests/ui/codegen/target-cpus.rs b/tests/ui/codegen/target-cpus.rs index 2d46e00f8034e..1670fe9e71b94 100644 --- a/tests/ui/codegen/target-cpus.rs +++ b/tests/ui/codegen/target-cpus.rs @@ -1,3 +1,9 @@ //@ needs-llvm-components: webassembly //@ compile-flags: --print=target-cpus --target=wasm32-unknown-unknown //@ check-pass + +// LLVM at HEAD has added support for the `lime1` CPU. Remove it from the +// output so that the stdout with LLVM-at-HEAD matches the output of the LLVM +// versions currently used by default. +// FIXME: Once Rust upgrades to LLVM 20, remove this. +//@ normalize-stdout-test: "(?m)^ *lime1\n" -> ""