Skip to content

Commit

Permalink
Auto merge of #31532 - tomaka:fix-emscripten, r=brson
Browse files Browse the repository at this point in the history
Before this PR:

> test result: FAILED. 2039 passed; 327 failed; 2 ignored; 0 measured

After:

> test result: FAILED. 2232 passed; 134 failed; 2 ignored; 0 measured

r? @brson
  • Loading branch information
bors committed Feb 11, 2016
2 parents a91ff1c + 657f1cf commit aa1dc09
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
12 changes: 7 additions & 5 deletions src/compiletest/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1229,11 +1229,13 @@ fn compose_and_run_compiler(config: &Config, props: &TestProps,
// for the test suite (otherwise including libstd statically in all
// executables takes up quite a bit of space).
//
// For targets like MUSL, however, there is no support for dynamic
// libraries so we just go back to building a normal library. Note,
// however, that if the library is built with `force_host` then it's
// ok to be a dylib as the host should always support dylibs.
if config.target.contains("musl") && !aux_props.force_host {
// For targets like MUSL or Emscripten, however, there is no support for
// dynamic libraries so we just go back to building a normal library. Note,
// however, that for MUSL if the library is built with `force_host` then
// it's ok to be a dylib as the host should always support dylibs.
if (config.target.contains("musl") && !aux_props.force_host) ||
config.target.contains("emscripten")
{
vec!("--crate-type=lib".to_owned())
} else {
vec!("--crate-type=dylib".to_owned())
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/sys/unix/fd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ impl FileDesc {
Ok(ret as usize)
}

#[cfg(not(any(target_env = "newlib", target_os = "solaris")))]
#[cfg(not(any(target_env = "newlib", target_os = "solaris", target_os = "emscripten")))]
pub fn set_cloexec(&self) {
unsafe {
let ret = libc::ioctl(self.fd, libc::FIOCLEX);
debug_assert_eq!(ret, 0);
}
}
#[cfg(any(target_env = "newlib", target_os = "solaris"))]
#[cfg(any(target_env = "newlib", target_os = "solaris", target_os = "emscripten"))]
pub fn set_cloexec(&self) {
unsafe {
let previous = libc::fcntl(self.fd, libc::F_GETFD);
Expand Down
3 changes: 2 additions & 1 deletion src/test/run-pass/x86stdcall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ pub fn main() {
target_os = "netbsd",
target_os = "openbsd",
target_os = "android",
target_os = "solaris"))]
target_os = "solaris",
target_os = "emscripten"))]
pub fn main() { }

0 comments on commit aa1dc09

Please sign in to comment.