From 62c3443e9659be2bf0ae53df1421c846ceaca904 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Fri, 18 Oct 2019 14:47:54 -0700 Subject: Re-enable Emscripten's exception handling support Passes LLVM codegen and Emscripten link-time flags for exception handling if and only if the panic strategy is `unwind`. Sets the default panic strategy for Emscripten targets to `unwind`. Re-enables tests that depend on unwinding support for Emscripten, including `should_panic` tests. --- src/bootstrap/native.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/bootstrap') diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index 97cdd256801..e76604e45bd 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 -- cgit 1.4.1-3-g733a5