Rollup merge of #149010 - Zalathar:wasm32-bare, r=jieyouxu

compiletest: Remove the "wasm32-bare" alias for `wasm32-unknown-unknown`

- Follow-up to https://github.com/rust-lang/rust/pull/148969

This "wasm32-bare" alias, understood by compiletest's `//@ ignore-wasm32-bare` and `//@ only-wasm32-bare` directives, dates all the way back to the original introduction of the `wasm32-unknown-unknown` target in https://github.com/rust-lang/rust/pull/45905.

But there is no compelling reason to use an alias instead of the full target name.

r? jieyouxu
This commit is contained in:
Stuart Cook 2025-11-17 16:41:07 +11:00 committed by GitHub
commit 06304ef100
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 4 additions and 17 deletions

View file

@ -141,7 +141,6 @@ Some examples of `X` in `ignore-X` or `only-X`:
- OS: `android`, `emscripten`, `freebsd`, `ios`, `linux`, `macos`, `windows`,
...
- Environment (fourth word of the target triple): `gnu`, `msvc`, `musl`
- WASM: `wasm32-bare` matches `wasm32-unknown-unknown`.
- Pointer width: `32bit`, `64bit`
- Endianness: `endian-big`
- Stage: `stage1`, `stage2`

View file

@ -147,14 +147,6 @@ fn parse_cfg_name_directive<'a>(
message: "when the target family is {name}"
}
// `wasm32-bare` is an alias to refer to just wasm32-unknown-unknown
// (in contrast to `wasm32` which also matches non-bare targets)
condition! {
name: "wasm32-bare",
condition: config.target == "wasm32-unknown-unknown",
message: "when the target is WASM"
}
condition! {
name: "thumb",
condition: config.target.starts_with("thumb"),

View file

@ -125,7 +125,7 @@ pub(crate) const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"ignore-wasi",
"ignore-wasm",
"ignore-wasm32",
"ignore-wasm32-bare",
"ignore-wasm32-unknown-unknown",
"ignore-wasm64",
"ignore-watchos",
"ignore-windows",
@ -240,7 +240,7 @@ pub(crate) const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"only-unix",
"only-visionos",
"only-wasm32",
"only-wasm32-bare",
"only-wasm32-unknown-unknown",
"only-wasm32-wasip1",
"only-watchos",
"only-windows",

View file

@ -710,18 +710,14 @@ fn wasm_special() {
let ignores = [
("wasm32-unknown-unknown", "emscripten", false),
("wasm32-unknown-unknown", "wasm32", true),
("wasm32-unknown-unknown", "wasm32-bare", true),
("wasm32-unknown-unknown", "wasm64", false),
("wasm32-unknown-emscripten", "emscripten", true),
("wasm32-unknown-emscripten", "wasm32", true),
("wasm32-unknown-emscripten", "wasm32-bare", false),
("wasm32-wasip1", "emscripten", false),
("wasm32-wasip1", "wasm32", true),
("wasm32-wasip1", "wasm32-bare", false),
("wasm32-wasip1", "wasi", true),
("wasm64-unknown-unknown", "emscripten", false),
("wasm64-unknown-unknown", "wasm32", false),
("wasm64-unknown-unknown", "wasm32-bare", false),
("wasm64-unknown-unknown", "wasm64", true),
];
for (target, pattern, ignore) in ignores {

View file

@ -3,7 +3,7 @@
//@ ignore-apple slightly different policy on stack protection of arrays
//@ ignore-msvc stack check code uses different function names
//@ ignore-nvptx64 stack protector is not supported
//@ ignore-wasm32-bare
//@ ignore-wasm32-unknown-unknown
//@ [all] compile-flags: -Z stack-protector=all
//@ [strong] compile-flags: -Z stack-protector=strong
//@ [basic] compile-flags: -Z stack-protector=basic

View file

@ -1,4 +1,4 @@
//@ only-wasm32-bare
//@ only-wasm32-unknown-unknown
use std::path::Path;