Commit Graph

7 Commits

Author SHA1 Message Date
Tyler Mandry
80db06d6da Fix ExitStatus on Fuchsia
Fuchsia exit codes don't follow the convention of libc::WEXITSTATUS et
al, and they are 64 bits instead of 32 bits. This gives Fuchsia its own
representation of ExitStatus.

Additionally, the zircon syscall structs were out of date, causing us to
see bogus return codes.
2019-09-25 15:26:42 -07:00
Alex Crichton
0b7ba6ec54 std: Improve downstream codegen in Command::env
This commit rejiggers the generics used in the implementation of
`Command::env` with the purpose of reducing the amount of codegen that
needs to happen in consumer crates, instead preferring to generate code
into libstd.

This was found when profiling the compile times of the `cc` crate where
the binary rlib produced had a lot of `BTreeMap` code compiled into it
but the crate doesn't actually use `BTreeMap`. It turns out that
`Command::env` is generic enough to codegen the entire implementation in
calling crates, but in this case there's no performance concern so it's
fine to compile the code into the standard library.

This change is done by removing the generic on the `CommandEnv` map
which is intended to handle case-insensitive variables on Windows.
Instead now a generic isn't used but rather a `use` statement defined
per-platform is used.

With this commit a debug build of `Command::new("foo").env("a", "b")`
drops from 21k lines of LLVM IR to 10k.
2019-09-05 11:43:35 -07:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Scott McMurray
74c5c6e6cb Move process::ExitCode internals to sys
Now begins the saga of fixing compilation errors on other platforms...
2018-03-03 18:44:44 -08:00
P.Y. Laligand
43cff131dd The Magenta kernel is now called Zircon. 2017-09-24 13:53:10 -07:00
Theodore DeRego
e1b752b2a1 std::process fuchsia support cleanup 2016-12-01 12:01:07 -08:00
Theodore DeRego
5c1c48532f Separated fuchsia-specific process stuff into 'process_fuchsia.rs' and refactored out some now-duplicated code into a 'process_common.rs' 2016-11-23 13:58:13 -08:00