Skip to content

Commit 4cdb783

Browse files
committed
migrate existing behavior of matches_arch
1 parent e085192 commit 4cdb783

File tree

1 file changed

+12
-1
lines changed
  • src/tools/compiletest/src/header

1 file changed

+12
-1
lines changed

src/tools/compiletest/src/header/cfg.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::common::{CompareMode, Config, Debugger};
22
use std::collections::HashSet;
33

4-
const EXTRA_ARCHS: &[&str] = &["asmjs", "spirv"];
4+
const EXTRA_ARCHS: &[&str] = &["spirv"];
55

66
/// Parses a name-value directive which contains config-specific information, e.g., `ignore-x86`
77
/// or `normalize-stderr-32bit`.
@@ -133,6 +133,17 @@ pub(super) fn parse_cfg_name_directive<'a>(
133133
message: "when the target is WASM"
134134
}
135135

136+
condition! {
137+
name: "asmjs",
138+
condition: config.target.starts_with("asmjs"),
139+
message: "when the architecture is asm.js",
140+
}
141+
condition! {
142+
name: "thumb",
143+
condition: config.target.starts_with("thumb"),
144+
message: "when the architecture is part of the Thumb family"
145+
}
146+
136147
condition! {
137148
name: &config.channel,
138149
allowed_names: &["stable", "beta", "nightly"],

0 commit comments

Comments
 (0)