diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index 97cdd25680162..e76604e45bdeb 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -534,6 +534,10 @@ impl Step for TestHelpers { builder.info("Building test helpers"); t!(fs::create_dir_all(&dst)); let mut cfg = cc::Build::new(); + // FIXME: Workaround for https://github.com/emscripten-core/emscripten/issues/9013 + if target.contains("emscripten") { + cfg.pic(false); + } // We may have found various cross-compilers a little differently due to our // extra configuration, so inform gcc of these compilers. Note, though, that diff --git a/src/librustc_codegen_llvm/llvm_util.rs b/src/librustc_codegen_llvm/llvm_util.rs index 2dce9b04c9e9e..85e0b6d465ab0 100644 --- a/src/librustc_codegen_llvm/llvm_util.rs +++ b/src/librustc_codegen_llvm/llvm_util.rs @@ -3,7 +3,7 @@ use crate::llvm; use syntax_pos::symbol::Symbol; use rustc::session::Session; use rustc::session::config::PrintRequest; -use rustc_target::spec::MergeFunctions; +use rustc_target::spec::{MergeFunctions, PanicStrategy}; use libc::c_int; use std::ffi::CString; use syntax::feature_gate::UnstableFeatures; @@ -73,6 +73,11 @@ unsafe fn configure_llvm(sess: &Session) { } } + if sess.target.target.target_os == "emscripten" && + sess.panic_strategy() == PanicStrategy::Unwind { + add("-enable-emscripten-cxx-exceptions"); + } + // HACK(eddyb) LLVM inserts `llvm.assume` calls to preserve align attributes // during inlining. Unfortunately these may block other optimizations. add("-preserve-alignment-assumptions-during-inlining=false"); diff --git a/src/librustc_codegen_ssa/back/symbol_export.rs b/src/librustc_codegen_ssa/back/symbol_export.rs index d866a10f06935..333af4cd1d75e 100644 --- a/src/librustc_codegen_ssa/back/symbol_export.rs +++ b/src/librustc_codegen_ssa/back/symbol_export.rs @@ -364,8 +364,9 @@ fn symbol_export_level(tcx: TyCtxt<'_>, sym_def_id: DefId) -> SymbolExportLevel codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::RUSTC_STD_INTERNAL_SYMBOL); if is_extern && !std_internal { - // Emscripten cannot export statics, so reduce their export level here - if tcx.sess.target.target.options.is_like_emscripten { + let target = &tcx.sess.target.target.llvm_target; + // WebAssembly cannot export data symbols, so reduce their export level + if target.contains("wasm32") || target.contains("emscripten") { if let Some(Node::Item(&hir::Item { kind: hir::ItemKind::Static(..), .. diff --git a/src/librustc_target/spec/wasm32_unknown_emscripten.rs b/src/librustc_target/spec/wasm32_unknown_emscripten.rs index 6a2c8c495372f..906c704c804f3 100644 --- a/src/librustc_target/spec/wasm32_unknown_emscripten.rs +++ b/src/librustc_target/spec/wasm32_unknown_emscripten.rs @@ -9,12 +9,8 @@ pub fn target() -> Result { "-s".to_string(), "ASSERTIONS=1".to_string(), "-s".to_string(), - "DISABLE_EXCEPTION_CATCHING=1".to_string(), - "-s".to_string(), "ABORTING_MALLOC=0".to_string(), - // FIXME(tlively): Enable this linker option once libc type errors - // are resolved. See https://github.com/rust-lang/libc/pull/1478. - // "-Wl,--fatal-warnings".to_string(), + "-Wl,--fatal-warnings".to_string(), ]); let opts = TargetOptions { @@ -24,10 +20,7 @@ pub fn target() -> Result { linker: None, linker_is_gnu: true, is_like_emscripten: true, - // FIXME(tlively): Emscripten supports unwinding, but we would have to pass - // -enable-emscripten-cxx-exceptions to LLVM at codegen time and merge - // https://reviews.llvm.org/rG5c3cdef84b82464756bb571c13c31cf7773860c3to use it. - panic_strategy: PanicStrategy::Abort, + panic_strategy: PanicStrategy::Unwind, post_link_args, target_family: Some("unix".to_string()), .. wasm32_base::options() diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 8c1e9f1722a26..341a2e18db5fc 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -441,9 +441,9 @@ pub fn run_test( ) { let TestDescAndFn { desc, testfn } = test; - // FIXME: Re-enable emscripten once it can catch panics again + // Emscripten can catch panics but other wasm targets cannot let ignore_because_no_process_support = desc.should_panic != ShouldPanic::No - && (cfg!(target_arch = "wasm32") || cfg!(target_os = "emscripten")); + && cfg!(target_arch = "wasm32") && !cfg!(target_os = "emscripten"); if force_ignore || desc.ignore || ignore_because_no_process_support { let message = CompletedTest::new(desc, TrIgnored, None, Vec::new()); diff --git a/src/test/codegen/c-variadic.rs b/src/test/codegen/c-variadic.rs index 7fa61d15f77c4..971f4e3e12ea8 100644 --- a/src/test/codegen/c-variadic.rs +++ b/src/test/codegen/c-variadic.rs @@ -1,4 +1,4 @@ -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default // compile-flags: -C no-prepopulate-passes // ignore-tidy-linelength diff --git a/src/test/codegen/drop.rs b/src/test/codegen/drop.rs index 49e40d5f243f1..959929fbafbf1 100644 --- a/src/test/codegen/drop.rs +++ b/src/test/codegen/drop.rs @@ -1,4 +1,4 @@ -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default // compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/src/test/codegen/personality_lifetimes.rs b/src/test/codegen/personality_lifetimes.rs index c82ae476b1b2c..9f07488a9a8a6 100644 --- a/src/test/codegen/personality_lifetimes.rs +++ b/src/test/codegen/personality_lifetimes.rs @@ -1,5 +1,5 @@ // ignore-msvc -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default // compile-flags: -O -C no-prepopulate-passes diff --git a/src/test/codegen/unwind-extern-exports.rs b/src/test/codegen/unwind-extern-exports.rs index d924a3b75dde3..e5a2936b92497 100644 --- a/src/test/codegen/unwind-extern-exports.rs +++ b/src/test/codegen/unwind-extern-exports.rs @@ -1,5 +1,5 @@ // compile-flags: -C opt-level=0 -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default #![crate_type = "lib"] #![feature(unwind_attributes)] diff --git a/src/test/codegen/unwind-extern-imports.rs b/src/test/codegen/unwind-extern-imports.rs index d88a498775642..8403e1e9da9fa 100644 --- a/src/test/codegen/unwind-extern-imports.rs +++ b/src/test/codegen/unwind-extern-imports.rs @@ -1,5 +1,5 @@ // compile-flags: -C no-prepopulate-passes -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default #![crate_type = "lib"] #![feature(unwind_attributes)] diff --git a/src/test/incremental/change_crate_dep_kind.rs b/src/test/incremental/change_crate_dep_kind.rs index 2bcb06d6eb8b7..8c35f6ca0000d 100644 --- a/src/test/incremental/change_crate_dep_kind.rs +++ b/src/test/incremental/change_crate_dep_kind.rs @@ -1,7 +1,7 @@ // Test that we detect changes to the `dep_kind` query. If the change is not // detected then -Zincremental-verify-ich will trigger an assertion. -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default // revisions:cfail1 cfail2 // compile-flags: -Z query-dep-graph -Cpanic=unwind // build-pass (FIXME(62277): could be check-pass?) diff --git a/src/test/mir-opt/box_expr.rs b/src/test/mir-opt/box_expr.rs index 4b66c07b0934b..8dc6b73edf6d4 100644 --- a/src/test/mir-opt/box_expr.rs +++ b/src/test/mir-opt/box_expr.rs @@ -1,4 +1,4 @@ -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default #![feature(box_syntax)] diff --git a/src/test/mir-opt/generator-storage-dead-unwind.rs b/src/test/mir-opt/generator-storage-dead-unwind.rs index b595c100039d6..109304d6d22cc 100644 --- a/src/test/mir-opt/generator-storage-dead-unwind.rs +++ b/src/test/mir-opt/generator-storage-dead-unwind.rs @@ -1,4 +1,4 @@ -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default // Test that we generate StorageDead on unwind paths for generators. // diff --git a/src/test/mir-opt/issue-41110.rs b/src/test/mir-opt/issue-41110.rs index 8824496fdb07c..e73390f52b5d5 100644 --- a/src/test/mir-opt/issue-41110.rs +++ b/src/test/mir-opt/issue-41110.rs @@ -1,4 +1,4 @@ -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default // check that we don't emit multiple drop flags when they are not needed. diff --git a/src/test/mir-opt/issue-62289.rs b/src/test/mir-opt/issue-62289.rs index 93250fd48d82d..a3b517e9bca87 100644 --- a/src/test/mir-opt/issue-62289.rs +++ b/src/test/mir-opt/issue-62289.rs @@ -1,7 +1,7 @@ // check that we don't forget to drop the Box if we early return before // initializing it // ignore-tidy-linelength -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default #![feature(box_syntax)] diff --git a/src/test/mir-opt/no-spurious-drop-after-call.rs b/src/test/mir-opt/no-spurious-drop-after-call.rs index 370cd593b02bb..782bc31186ca5 100644 --- a/src/test/mir-opt/no-spurious-drop-after-call.rs +++ b/src/test/mir-opt/no-spurious-drop-after-call.rs @@ -1,4 +1,4 @@ -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default // Test that after the call to `std::mem::drop` we do not generate a // MIR drop of the argument. (We used to have a `DROP(_2)` in the code diff --git a/src/test/mir-opt/packed-struct-drop-aligned.rs b/src/test/mir-opt/packed-struct-drop-aligned.rs index eaa1fbd69ecc6..da73cc96348f0 100644 --- a/src/test/mir-opt/packed-struct-drop-aligned.rs +++ b/src/test/mir-opt/packed-struct-drop-aligned.rs @@ -1,4 +1,4 @@ -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default fn main() { let mut x = Packed(Aligned(Droppy(0))); diff --git a/src/test/mir-opt/remove_fake_borrows.rs b/src/test/mir-opt/remove_fake_borrows.rs index 71beaa736639d..965897ad541e7 100644 --- a/src/test/mir-opt/remove_fake_borrows.rs +++ b/src/test/mir-opt/remove_fake_borrows.rs @@ -1,6 +1,6 @@ // Test that the fake borrows for matches are removed after borrow checking. -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default fn match_guard(x: Option<&&i32>, c: bool) -> i32 { match x { diff --git a/src/test/mir-opt/retag.rs b/src/test/mir-opt/retag.rs index a0bdfb3ab8ba9..db36a1fab5f21 100644 --- a/src/test/mir-opt/retag.rs +++ b/src/test/mir-opt/retag.rs @@ -1,4 +1,4 @@ -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default // ignore-tidy-linelength // compile-flags: -Z mir-emit-retag -Z mir-opt-level=0 -Z span_free_formats diff --git a/src/test/ui/abi/statics/static-mut-foreign.rs b/src/test/ui/abi/statics/static-mut-foreign.rs index b30e8f00e4035..5d6fa416b9895 100644 --- a/src/test/ui/abi/statics/static-mut-foreign.rs +++ b/src/test/ui/abi/statics/static-mut-foreign.rs @@ -5,10 +5,6 @@ // ignore-wasm32-bare no libc to test ffi with -// FIXME: This will work on emscripten once libc is updated to include -// rust-lang/libc/#1478 -// ignore-emscripten libc type mismatch - #![feature(rustc_private)] extern crate libc; diff --git a/src/test/ui/binding/fn-arg-incomplete-pattern-drop-order.rs b/src/test/ui/binding/fn-arg-incomplete-pattern-drop-order.rs index 4e0a238c5d48d..ea4a9e5afa501 100644 --- a/src/test/ui/binding/fn-arg-incomplete-pattern-drop-order.rs +++ b/src/test/ui/binding/fn-arg-incomplete-pattern-drop-order.rs @@ -2,7 +2,7 @@ // Check that partially moved from function parameters are dropped after the // named bindings that move from them. -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default use std::{panic, cell::RefCell}; diff --git a/src/test/ui/builtin-clone-unwind.rs b/src/test/ui/builtin-clone-unwind.rs index 1fd91440a7884..339bcfa1060a4 100644 --- a/src/test/ui/builtin-clone-unwind.rs +++ b/src/test/ui/builtin-clone-unwind.rs @@ -2,7 +2,7 @@ #![allow(unused_variables)] #![allow(unused_imports)] -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default // Test that builtin implementations of `Clone` cleanup everything // in case of unwinding. diff --git a/src/test/ui/catch-unwind-bang.rs b/src/test/ui/catch-unwind-bang.rs index c2c21bca7ef71..f181991713b2c 100644 --- a/src/test/ui/catch-unwind-bang.rs +++ b/src/test/ui/catch-unwind-bang.rs @@ -1,5 +1,5 @@ // run-pass -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default fn worker() -> ! { panic!() diff --git a/src/test/ui/drop/dynamic-drop-async.rs b/src/test/ui/drop/dynamic-drop-async.rs index bec86d6465ae9..91063edf0f6c4 100644 --- a/src/test/ui/drop/dynamic-drop-async.rs +++ b/src/test/ui/drop/dynamic-drop-async.rs @@ -5,7 +5,7 @@ // run-pass // edition:2018 -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default #![feature(slice_patterns)] #![allow(unused)] diff --git a/src/test/ui/drop/dynamic-drop.rs b/src/test/ui/drop/dynamic-drop.rs index 5a7568fe2cd50..29dcbfe9609a0 100644 --- a/src/test/ui/drop/dynamic-drop.rs +++ b/src/test/ui/drop/dynamic-drop.rs @@ -2,7 +2,7 @@ #![allow(unused_assignments)] #![allow(unused_variables)] -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default #![feature(generators, generator_trait, untagged_unions)] #![feature(slice_patterns)] diff --git a/src/test/ui/feature-gates/feature-gate-unwind-attributes.rs b/src/test/ui/feature-gates/feature-gate-unwind-attributes.rs index 759fb170f90dd..20c443b63d175 100644 --- a/src/test/ui/feature-gates/feature-gate-unwind-attributes.rs +++ b/src/test/ui/feature-gates/feature-gate-unwind-attributes.rs @@ -1,4 +1,4 @@ -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default // compile-flags: -C no-prepopulate-passes -Cpasses=name-anon-globals #![crate_type = "lib"] diff --git a/src/test/ui/generator/panic-drops.rs b/src/test/ui/generator/panic-drops.rs index b1a5cc67e86b3..f88687858fd11 100644 --- a/src/test/ui/generator/panic-drops.rs +++ b/src/test/ui/generator/panic-drops.rs @@ -1,6 +1,6 @@ // run-pass -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default #![feature(generators, generator_trait)] diff --git a/src/test/ui/generator/panic-safe.rs b/src/test/ui/generator/panic-safe.rs index 06c026180190a..5f6778674dce1 100644 --- a/src/test/ui/generator/panic-safe.rs +++ b/src/test/ui/generator/panic-safe.rs @@ -1,6 +1,6 @@ // run-pass -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default #![feature(generators, generator_trait)] diff --git a/src/test/ui/generator/resume-after-return.rs b/src/test/ui/generator/resume-after-return.rs index ab18be58155df..71a68ff684af3 100644 --- a/src/test/ui/generator/resume-after-return.rs +++ b/src/test/ui/generator/resume-after-return.rs @@ -1,6 +1,6 @@ // run-pass -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default #![feature(generators, generator_trait)] diff --git a/src/test/ui/issues/issue-14875.rs b/src/test/ui/issues/issue-14875.rs index 29e974ad83d1e..0d95d168b3db3 100644 --- a/src/test/ui/issues/issue-14875.rs +++ b/src/test/ui/issues/issue-14875.rs @@ -1,5 +1,5 @@ // run-pass -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default // Check that values are not leaked when a dtor panics (#14875) diff --git a/src/test/ui/issues/issue-29948.rs b/src/test/ui/issues/issue-29948.rs index 5237a2f67bdd7..8ede8143ea657 100644 --- a/src/test/ui/issues/issue-29948.rs +++ b/src/test/ui/issues/issue-29948.rs @@ -1,5 +1,5 @@ // run-pass -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default use std::panic; diff --git a/src/test/ui/issues/issue-43853.rs b/src/test/ui/issues/issue-43853.rs index 2a932db05af26..47c3ab59aa2eb 100644 --- a/src/test/ui/issues/issue-43853.rs +++ b/src/test/ui/issues/issue-43853.rs @@ -1,5 +1,5 @@ // run-pass -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default use std::panic; diff --git a/src/test/ui/issues/issue-46519.rs b/src/test/ui/issues/issue-46519.rs index 40c3117f01ce9..cca0995d4ca10 100644 --- a/src/test/ui/issues/issue-46519.rs +++ b/src/test/ui/issues/issue-46519.rs @@ -1,7 +1,7 @@ // run-pass // compile-flags:--test -O -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default #[test] #[should_panic(expected = "creating inhabited type")] diff --git a/src/test/ui/iterators/iter-count-overflow-debug.rs b/src/test/ui/iterators/iter-count-overflow-debug.rs index fdd285dcad2a1..d661203575083 100644 --- a/src/test/ui/iterators/iter-count-overflow-debug.rs +++ b/src/test/ui/iterators/iter-count-overflow-debug.rs @@ -1,6 +1,6 @@ // run-pass // only-32bit too impatient for 2⁶⁴ items -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default // compile-flags: -C debug_assertions=yes -C opt-level=3 use std::panic; diff --git a/src/test/ui/iterators/iter-position-overflow-debug.rs b/src/test/ui/iterators/iter-position-overflow-debug.rs index b578999af8e94..f1eded31702c4 100644 --- a/src/test/ui/iterators/iter-position-overflow-debug.rs +++ b/src/test/ui/iterators/iter-position-overflow-debug.rs @@ -1,6 +1,6 @@ // run-pass // only-32bit too impatient for 2⁶⁴ items -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default // compile-flags: -C debug_assertions=yes -C opt-level=3 use std::panic; diff --git a/src/test/ui/iterators/iter-step-overflow-debug.rs b/src/test/ui/iterators/iter-step-overflow-debug.rs index 3872a03b68259..5d67c7cbb4256 100644 --- a/src/test/ui/iterators/iter-step-overflow-debug.rs +++ b/src/test/ui/iterators/iter-step-overflow-debug.rs @@ -1,5 +1,5 @@ // run-pass -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default // compile-flags: -C debug_assertions=yes use std::panic; diff --git a/src/test/ui/iterators/iter-sum-overflow-debug.rs b/src/test/ui/iterators/iter-sum-overflow-debug.rs index 4a9e8cdb72e70..ee4ab4d24c6ab 100644 --- a/src/test/ui/iterators/iter-sum-overflow-debug.rs +++ b/src/test/ui/iterators/iter-sum-overflow-debug.rs @@ -1,5 +1,5 @@ // run-pass -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default // compile-flags: -C debug_assertions=yes use std::panic; diff --git a/src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs b/src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs index 6bd1425e32465..429f8e0bc9648 100644 --- a/src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs +++ b/src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs @@ -1,5 +1,5 @@ // run-pass -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default // compile-flags: -C overflow-checks use std::panic; diff --git a/src/test/ui/macros/macro-comma-behavior-rpass.rs b/src/test/ui/macros/macro-comma-behavior-rpass.rs index 1c791bb1ca3d6..32cf59294e760 100644 --- a/src/test/ui/macros/macro-comma-behavior-rpass.rs +++ b/src/test/ui/macros/macro-comma-behavior-rpass.rs @@ -13,7 +13,7 @@ // compile-flags: --test -C debug_assertions=yes // revisions: std core -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default #![cfg_attr(core, no_std)] diff --git a/src/test/ui/mir/mir_calls_to_shims.rs b/src/test/ui/mir/mir_calls_to_shims.rs index de8d958af45e3..6f13d5612ce51 100644 --- a/src/test/ui/mir/mir_calls_to_shims.rs +++ b/src/test/ui/mir/mir_calls_to_shims.rs @@ -1,5 +1,5 @@ // run-pass -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default #![feature(fn_traits)] #![feature(never_type)] diff --git a/src/test/ui/mir/mir_drop_order.rs b/src/test/ui/mir/mir_drop_order.rs index 2bc5cf1c97637..2949437b1e4b6 100644 --- a/src/test/ui/mir/mir_drop_order.rs +++ b/src/test/ui/mir/mir_drop_order.rs @@ -1,5 +1,5 @@ // run-pass -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default use std::cell::RefCell; use std::panic; diff --git a/src/test/ui/never_type/panic-uninitialized-zeroed.rs b/src/test/ui/never_type/panic-uninitialized-zeroed.rs index 72b844d8b4886..e0c30160b9e94 100644 --- a/src/test/ui/never_type/panic-uninitialized-zeroed.rs +++ b/src/test/ui/never_type/panic-uninitialized-zeroed.rs @@ -1,5 +1,5 @@ // run-pass -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default // This test checks that instantiating an uninhabited type via `mem::{uninitialized,zeroed}` results // in a runtime panic. diff --git a/src/test/ui/numbers-arithmetic/next-power-of-two-overflow-debug.rs b/src/test/ui/numbers-arithmetic/next-power-of-two-overflow-debug.rs index c1959866e5c25..e9927304f23f8 100644 --- a/src/test/ui/numbers-arithmetic/next-power-of-two-overflow-debug.rs +++ b/src/test/ui/numbers-arithmetic/next-power-of-two-overflow-debug.rs @@ -1,6 +1,6 @@ // run-pass // compile-flags: -C debug_assertions=yes -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default // ignore-emscripten dies with an LLVM error use std::panic; diff --git a/src/test/ui/panic-runtime/transitive-link-a-bunch.rs b/src/test/ui/panic-runtime/transitive-link-a-bunch.rs index 6dcb852a3669f..5d72771c2dcff 100644 --- a/src/test/ui/panic-runtime/transitive-link-a-bunch.rs +++ b/src/test/ui/panic-runtime/transitive-link-a-bunch.rs @@ -4,7 +4,7 @@ // aux-build:wants-panic-runtime-abort.rs // aux-build:panic-runtime-lang-items.rs // error-pattern: is not compiled with this crate's panic strategy `unwind` -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default #![no_std] #![no_main] diff --git a/src/test/ui/panic-runtime/want-unwind-got-abort.rs b/src/test/ui/panic-runtime/want-unwind-got-abort.rs index e7811d40b5b9a..4c25c09d6438f 100644 --- a/src/test/ui/panic-runtime/want-unwind-got-abort.rs +++ b/src/test/ui/panic-runtime/want-unwind-got-abort.rs @@ -1,7 +1,7 @@ // error-pattern:is incompatible with this crate's strategy of `unwind` // aux-build:panic-runtime-abort.rs // aux-build:panic-runtime-lang-items.rs -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default #![no_std] #![no_main] diff --git a/src/test/ui/panic-runtime/want-unwind-got-abort2.rs b/src/test/ui/panic-runtime/want-unwind-got-abort2.rs index 44671796c01a3..478af451e7f65 100644 --- a/src/test/ui/panic-runtime/want-unwind-got-abort2.rs +++ b/src/test/ui/panic-runtime/want-unwind-got-abort2.rs @@ -2,7 +2,7 @@ // aux-build:panic-runtime-abort.rs // aux-build:wants-panic-runtime-abort.rs // aux-build:panic-runtime-lang-items.rs -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default #![no_std] #![no_main] diff --git a/src/test/ui/proc-macro/expand-with-a-macro.rs b/src/test/ui/proc-macro/expand-with-a-macro.rs index 690a76ef3e0af..418178d0f0ead 100644 --- a/src/test/ui/proc-macro/expand-with-a-macro.rs +++ b/src/test/ui/proc-macro/expand-with-a-macro.rs @@ -1,7 +1,7 @@ // run-pass // aux-build:expand-with-a-macro.rs -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default #![deny(warnings)] diff --git a/src/test/ui/reachable-unnameable-items.rs b/src/test/ui/reachable-unnameable-items.rs index 26c51efea1e1c..f1e53a0d8b426 100644 --- a/src/test/ui/reachable-unnameable-items.rs +++ b/src/test/ui/reachable-unnameable-items.rs @@ -1,5 +1,5 @@ // run-pass -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default // aux-build:reachable-unnameable-items.rs extern crate reachable_unnameable_items; diff --git a/src/test/ui/rfc-1937-termination-trait/termination-trait-in-test.rs b/src/test/ui/rfc-1937-termination-trait/termination-trait-in-test.rs index c8e8b9dcfc6a7..0bd7bf3d51a78 100644 --- a/src/test/ui/rfc-1937-termination-trait/termination-trait-in-test.rs +++ b/src/test/ui/rfc-1937-termination-trait/termination-trait-in-test.rs @@ -1,7 +1,7 @@ // compile-flags: --test // run-pass -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default #![feature(test)] diff --git a/src/test/ui/rfcs/rfc1857-drop-order.rs b/src/test/ui/rfcs/rfc1857-drop-order.rs index b10b6ec11b53a..7923aa7c0e22f 100644 --- a/src/test/ui/rfcs/rfc1857-drop-order.rs +++ b/src/test/ui/rfcs/rfc1857-drop-order.rs @@ -1,5 +1,5 @@ // run-pass -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default #![allow(dead_code, unreachable_code)] diff --git a/src/test/ui/test-attrs/test-allow-fail-attr.rs b/src/test/ui/test-attrs/test-allow-fail-attr.rs index 55b743ab7c7ea..1a478460efc6c 100644 --- a/src/test/ui/test-attrs/test-allow-fail-attr.rs +++ b/src/test/ui/test-attrs/test-allow-fail-attr.rs @@ -1,5 +1,5 @@ // run-pass -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default // compile-flags: --test #![feature(allow_fail)] diff --git a/src/test/ui/test-attrs/test-should-fail-good-message.rs b/src/test/ui/test-attrs/test-should-fail-good-message.rs index 2284953fbbe94..9fa759f9eb483 100644 --- a/src/test/ui/test-attrs/test-should-fail-good-message.rs +++ b/src/test/ui/test-attrs/test-should-fail-good-message.rs @@ -1,5 +1,5 @@ // run-pass -// ignore-emscripten compiled with panic=abort by default +// ignore-wasm32-bare compiled with panic=abort by default // compile-flags: --test #[test] #[should_panic(expected = "foo")] diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index 0309488506584..d750595e272cf 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -141,10 +141,6 @@ impl EarlyProps { if config.target == "wasm32-unknown-unknown" && config.parse_check_run_results(ln) { props.ignore = Ignore::Ignore; } - // FIXME: Re-enable run-fail once panics are handled correctly - if config.target.contains("emscripten") && config.mode == common::RunFail { - props.ignore = Ignore::Ignore; - } } if (config.mode == common::DebugInfoGdb || config.mode == common::DebugInfoGdbLldb) &&