rust/src/libstd/sys/sgx
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
..
abi Use associated_type_bounds where applicable - closes #61738 2019-08-08 22:39:15 +02:00
ext fix some uses I missed 2019-03-26 09:23:19 +01:00
alloc.rs SGX target: fix cfg(test) build 2019-04-10 14:08:54 -07:00
args.rs SGX target: fix std unit tests 2019-03-25 11:31:19 -07:00
cmath.rs Remove licenses 2018-12-25 21:08:33 -07:00
condvar.rs Fix unlock ordering in SGX synchronization primitives 2019-08-30 20:35:27 -07:00
env.rs Remove licenses 2018-12-25 21:08:33 -07:00
fd.rs SGX target: implemented vectored I/O 2019-04-29 16:48:22 -07:00
fs.rs Stabilized vectored IO 2019-04-27 08:34:08 -07:00
io.rs Add {IoSlice, IoSliceMut}::advance 2019-08-03 10:44:45 +02:00
memchr.rs Remove licenses 2018-12-25 21:08:33 -07:00
mod.rs Remove last use of mem::uninitialized in SGX 2019-07-05 09:03:49 -07:00
mutex.rs Fix unlock ordering in SGX synchronization primitives 2019-08-30 20:35:27 -07:00
net.rs SGX target: implemented vectored I/O 2019-04-29 16:48:22 -07:00
os.rs libstd: deny(elided_lifetimes_in_paths) 2019-03-31 12:56:51 +02:00
path.rs libstd: deny(elided_lifetimes_in_paths) 2019-03-31 12:56:51 +02:00
pipe.rs Stabilized vectored IO 2019-04-27 08:34:08 -07:00
process.rs std: Improve downstream codegen in Command::env 2019-09-05 11:43:35 -07:00
rwlock.rs Fix unlock ordering in SGX synchronization primitives 2019-08-30 20:35:27 -07:00
stack_overflow.rs SGX target: fix std unit tests 2019-03-25 11:31:19 -07:00
stdio.rs SGX target: Use linker option to avoid code CGU assignment kludge 2019-04-01 17:41:37 -07:00
thread.rs Eliminate FnBox usages from libstd. 2019-04-10 09:40:44 +08:00
thread_local.rs Remove licenses 2018-12-25 21:08:33 -07:00
time.rs Update sys::time impls to have checked_sub_instant 2019-03-22 23:56:40 +01:00
waitqueue.rs Fix unlock ordering in SGX synchronization primitives 2019-08-30 20:35:27 -07:00