Skip to content

Commit

Permalink
Remove nacl from libstd
Browse files Browse the repository at this point in the history
  • Loading branch information
est31 committed Oct 5, 2017
1 parent b8fad2d commit aad1c99
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 232 deletions.
1 change: 0 additions & 1 deletion src/libstd/os/mod.rs
Expand Up @@ -38,7 +38,6 @@ pub mod linux;
#[cfg(all(not(dox), target_os = "haiku"))] pub mod haiku;
#[cfg(all(not(dox), target_os = "ios"))] pub mod ios;
#[cfg(all(not(dox), target_os = "macos"))] pub mod macos;
#[cfg(all(not(dox), target_os = "nacl"))] pub mod nacl;
#[cfg(all(not(dox), target_os = "netbsd"))] pub mod netbsd;
#[cfg(all(not(dox), target_os = "openbsd"))] pub mod openbsd;
#[cfg(all(not(dox), target_os = "solaris"))] pub mod solaris;
Expand Down
128 changes: 0 additions & 128 deletions src/libstd/os/nacl/fs.rs

This file was deleted.

16 changes: 0 additions & 16 deletions src/libstd/os/nacl/mod.rs

This file was deleted.

56 changes: 0 additions & 56 deletions src/libstd/os/nacl/raw.rs

This file was deleted.

21 changes: 0 additions & 21 deletions src/libstd/sys/unix/env.rs
Expand Up @@ -118,27 +118,6 @@ pub mod os {
pub const EXE_EXTENSION: &'static str = "";
}

#[cfg(all(target_os = "nacl", not(target_arch = "le32")))]
pub mod os {
pub const FAMILY: &'static str = "unix";
pub const OS: &'static str = "nacl";
pub const DLL_PREFIX: &'static str = "lib";
pub const DLL_SUFFIX: &'static str = ".so";
pub const DLL_EXTENSION: &'static str = "so";
pub const EXE_SUFFIX: &'static str = ".nexe";
pub const EXE_EXTENSION: &'static str = "nexe";
}
#[cfg(all(target_os = "nacl", target_arch = "le32"))]
pub mod os {
pub const FAMILY: &'static str = "unix";
pub const OS: &'static str = "pnacl";
pub const DLL_PREFIX: &'static str = "lib";
pub const DLL_SUFFIX: &'static str = ".pso";
pub const DLL_EXTENSION: &'static str = "pso";
pub const EXE_SUFFIX: &'static str = ".pexe";
pub const EXE_EXTENSION: &'static str = "pexe";
}

#[cfg(target_os = "haiku")]
pub mod os {
pub const FAMILY: &'static str = "unix";
Expand Down
5 changes: 2 additions & 3 deletions src/libstd/sys/unix/mod.rs
Expand Up @@ -22,7 +22,6 @@ use libc;
#[cfg(all(not(dox), target_os = "haiku"))] pub use os::haiku as platform;
#[cfg(all(not(dox), target_os = "ios"))] pub use os::ios as platform;
#[cfg(all(not(dox), target_os = "macos"))] pub use os::macos as platform;
#[cfg(all(not(dox), target_os = "nacl"))] pub use os::nacl as platform;
#[cfg(all(not(dox), target_os = "netbsd"))] pub use os::netbsd as platform;
#[cfg(all(not(dox), target_os = "openbsd"))] pub use os::openbsd as platform;
#[cfg(all(not(dox), target_os = "solaris"))] pub use os::solaris as platform;
Expand Down Expand Up @@ -77,11 +76,11 @@ pub fn init() {
reset_sigpipe();
}

#[cfg(not(any(target_os = "nacl", target_os = "emscripten", target_os="fuchsia")))]
#[cfg(not(any(target_os = "emscripten", target_os="fuchsia")))]
unsafe fn reset_sigpipe() {
assert!(signal(libc::SIGPIPE, libc::SIG_IGN) != libc::SIG_ERR);
}
#[cfg(any(target_os = "nacl", target_os = "emscripten", target_os="fuchsia"))]
#[cfg(any(target_os = "emscripten", target_os="fuchsia"))]
unsafe fn reset_sigpipe() {}
}

Expand Down
2 changes: 0 additions & 2 deletions src/libstd/sys/unix/os.rs
Expand Up @@ -483,12 +483,10 @@ pub fn home_dir() -> Option<PathBuf> {

#[cfg(any(target_os = "android",
target_os = "ios",
target_os = "nacl",
target_os = "emscripten"))]
unsafe fn fallback() -> Option<OsString> { None }
#[cfg(not(any(target_os = "android",
target_os = "ios",
target_os = "nacl",
target_os = "emscripten")))]
unsafe fn fallback() -> Option<OsString> {
let amt = match libc::sysconf(libc::_SC_GETPW_R_SIZE_MAX) {
Expand Down
1 change: 0 additions & 1 deletion src/libstd/sys/unix/process/process_common.rs
Expand Up @@ -464,7 +464,6 @@ mod tests {
// test from being flaky we ignore it on macOS.
#[test]
#[cfg_attr(target_os = "macos", ignore)]
#[cfg_attr(target_os = "nacl", ignore)] // no signals on NaCl.
// When run under our current QEMU emulation test suite this test fails,
// although the reason isn't very clear as to why. For now this test is
// ignored there.
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/sys/unix/process/process_unix.rs
Expand Up @@ -184,8 +184,8 @@ impl Command {
*sys::os::environ() = envp.as_ptr();
}

// NaCl has no signal support.
#[cfg(not(any(target_os = "nacl", target_os = "emscripten")))]
// emscripten has no signal support.
#[cfg(not(any(target_os = "emscripten")))]
{
use mem;
// Reset signal handling so the child process starts in a
Expand Down
2 changes: 0 additions & 2 deletions src/libstd/sys_common/backtrace.rs
Expand Up @@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![cfg_attr(target_os = "nacl", allow(dead_code))]

/// Common code for printing the backtrace in the same way across the different
/// supported platforms.

Expand Down

0 comments on commit aad1c99

Please sign in to comment.