Skip to content

Commit 282f522

Browse files
committed
Make relevant Wasm target features target modifiers
1 parent 323b7a0 commit 282f522

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

compiler/rustc_target/src/target_features.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,9 +773,9 @@ static RISCV_FEATURES: &[(&str, Stability, ImpliedFeatures, TargetModifier)] = &
773773

774774
static WASM_FEATURES: &[(&str, Stability, ImpliedFeatures, TargetModifier)] = &[
775775
// tidy-alphabetical-start
776-
("atomics", Unstable(sym::wasm_target_feature), &[], false),
776+
("atomics", Unstable(sym::wasm_target_feature), &[], true),
777777
("bulk-memory", Stable, &[], false),
778-
("exception-handling", Unstable(sym::wasm_target_feature), &[], false),
778+
("exception-handling", Unstable(sym::wasm_target_feature), &[], true),
779779
("extended-const", Stable, &[], false),
780780
("multivalue", Stable, &[], false),
781781
("mutable-globals", Stable, &[], false),

src/tools/tidy/src/style.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ fn should_ignore(line: &str) -> bool {
215215
// For `ui_test`-style UI test directives, also ignore
216216
// - `//@[rev] compile-flags`
217217
// - `//@[rev] normalize-stderr`
218-
|| static_regex!("\\s*//@(\\[.*\\]) (compile-flags|normalize-stderr|error-pattern).*")
218+
|| static_regex!("\\s*//@ *(\\[.*\\]) (compile-flags|normalize-stderr|error-pattern).*")
219219
.is_match(line)
220220
// Matching for rustdoc tests commands.
221221
// It allows to prevent them emitting warnings like `line longer than 100 chars`.

tests/assembly-llvm/wasm_exceptions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ only-wasm32
22
//@ assembly-output: emit-asm
3-
//@ compile-flags: -C target-feature=+exception-handling
3+
//@ compile-flags: -C target-feature=+exception-handling -C unsafe-allow-abi-mismatch=target-feature
44
//@ compile-flags: -C panic=unwind
55

66
#![crate_type = "lib"]

tests/codegen-llvm/unwind-abis/c-unwind-abi-panic-abort.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//@ [NONWASM] ignore-wasm32
44
//@ [WASM] only-wasm32
55
//@ [WASMEXN] only-wasm32
6-
//@ [WASMEXN] compile-flags: -Ctarget-feature=+exception-handling
6+
//@ [WASMEXN] compile-flags: -Ctarget-feature=+exception-handling -C unsafe-allow-abi-mismatch=target-feature
77

88
// Test that `nounwind` attributes are also applied to extern `C-unwind` Rust functions
99
// when the code is compiled with `panic=abort`.

tests/codegen-llvm/unwind-and-panic-abort.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//@ [NONWASM] ignore-wasm32
44
//@ [WASM] only-wasm32
55
//@ [WASMEXN] only-wasm32
6-
//@ [WASMEXN] compile-flags: -Ctarget-feature=+exception-handling
6+
//@ [WASMEXN] compile-flags: -Ctarget-feature=+exception-handling -C unsafe-allow-abi-mismatch=target-feature
77

88
#![crate_type = "lib"]
99

tests/run-make/wasm-exceptions-nostd/rmake.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ fn main() {
1212
.panic("unwind")
1313
.arg("-Cllvm-args=-wasm-enable-eh")
1414
.arg("-Ctarget-feature=+exception-handling")
15+
.arg("-Cunsafe-allow-abi-mismatch=target-feature")
1516
.run();
1617

1718
cmd(&env_var("NODE")).arg("verify.mjs").arg("lib.wasm").run();

0 commit comments

Comments
 (0)