Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable more tests for Emscripten targets #68082

Closed
wants to merge 7 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fmt and address comment
tlively committed Jan 11, 2020
commit 8a12ac0022edfa36da8522a5f9485e2af155fe15
13 changes: 10 additions & 3 deletions src/librustc_codegen_ssa/back/linker.rs
Original file line number Diff line number Diff line change
@@ -156,8 +156,9 @@ impl<'a> GccLinker<'a> {
// * On OSX they have their own linker, not binutils'
// * For WebAssembly/JS the only functional linker is LLD, which doesn't
// support hint flags
!self.sess.target.target.options.is_like_osx && self.sess.target.target.arch != "wasm32" &&
self.sess.target.target.arch != "asmjs"
!self.sess.target.target.options.is_like_osx
&& self.sess.target.target.arch != "wasm32"
&& self.sess.target.target.arch != "asmjs"
}

// Some platforms take hints about whether a library is static or dynamic.
@@ -869,7 +870,13 @@ impl<'a> Linker for EmLinker<'a> {
DebugInfo::Limited => "-g3",
// FIXME: wasm2js errors with -g3 and above because it does not support source maps.
// See https://github.com/WebAssembly/binaryen/issues/2410
DebugInfo::Full => if self.sess.target.target.arch == "asmjs" { "-g3" } else { "-g4" },
DebugInfo::Full => {
if self.sess.target.target.arch == "asmjs" {
"-g3"
} else {
"-g4"
}
}
});
}

2 changes: 1 addition & 1 deletion src/libstd/sys/mod.rs
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ cfg_if::cfg_if! {
} else if #[cfg(target_os = "wasi")] {
mod wasi;
pub use self::wasi::*;
} else if #[cfg(any(target_arch = "wasm32", target_arch = "asmjs"))] {
} else if #[cfg(target_arch = "wasm32")] {
mod wasm;
pub use self::wasm::*;
} else if #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))] {
5 changes: 4 additions & 1 deletion src/libstd/thread/mod.rs
Original file line number Diff line number Diff line change
@@ -203,7 +203,10 @@ pub use self::local::fast::Key as __FastLocalKeyInner;
#[doc(hidden)]
pub use self::local::os::Key as __OsLocalKeyInner;
#[unstable(feature = "libstd_thread_internals", issue = "none")]
#[cfg(all(any(target_arch = "wasm32", target_arch = "asmjs"), not(target_feature = "atomics")))]
#[cfg(all(
any(target_arch = "wasm32", target_arch = "asmjs"),
not(target_feature = "atomics")
))]
#[doc(hidden)]
pub use self::local::statik::Key as __StaticLocalKeyInner;

2 changes: 1 addition & 1 deletion src/libtest/tests.rs
Original file line number Diff line number Diff line change
@@ -188,8 +188,8 @@ fn test_should_panic_bad_message() {

#[test]
fn test_should_panic_non_string_message_type() {
use std::any::TypeId;
use crate::tests::TrFailedMsg;
use std::any::TypeId;
fn f() {
panic!(1i32);
}