Skip to content

Commit e82ee96

Browse files
Rollup merge of #133910 - TimNN:llvm-target-cpus, r=jieyouxu
Normalize target-cpus.rs stdout test for LLVM changes LLVM has recently added support for the `lime1` CPU in llvm/llvm-project@35cce40, so the `target-cpus.rs` test currently produces different output depending on the LLVM version. This CL adds a normalization directive, to remove the new CPU from the output list. Alternatives fixes I can think of: * Add two revisions of the test (one per LLVM version) * Ignore the test on one of the LLVM versions * I dislike this, because it's possible that the test won't get updated for the next LLVM version. I don't think the exact list of target CPUs is relevant for this test, so it shouldn't be too bad if the normalization sticks around longer than necessary. `@rustbot` label: +llvm-main
2 parents 9765a4e + 9aa4be0 commit e82ee96

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: tests/ui/codegen/target-cpus.rs

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
//@ needs-llvm-components: webassembly
22
//@ compile-flags: --print=target-cpus --target=wasm32-unknown-unknown
33
//@ check-pass
4+
5+
// LLVM at HEAD has added support for the `lime1` CPU. Remove it from the
6+
// output so that the stdout with LLVM-at-HEAD matches the output of the LLVM
7+
// versions currently used by default.
8+
// FIXME(#133919): Once Rust upgrades to LLVM 20, remove this.
9+
//@ normalize-stdout-test: "(?m)^ *lime1\n" -> ""

0 commit comments

Comments
 (0)