Commit Graph

2300 Commits

Author SHA1 Message Date
Baoshan Pang
5287885481 use randSecure and randABytes 2019-09-10 15:11:34 -07:00
Baoshan Pang
5318f98c06 remove Copyright notic 2019-09-10 09:25:22 -07:00
Mazdak Farrokhzad
8bee18baa3 Rollup merge of #64023 - tmandry:libstd-fuchsia-fixes, r=cramertj
libstd fuchsia fixes

This fixes two bugs in libstd on Fuchsia:

- `zx_time_t` was changed to an `i64`, but this never made it into libstd
- When spawning processes where any of the stdio were null, libstd attempts to open `/dev/null`, which doesn't exist on Fuchsia

r? @cramertj
2019-09-07 20:01:41 +02:00
Mazdak Farrokhzad
61fcd057d2 Rollup merge of #64198 - cramertj:fuchsia-monotonic, r=alexcrichton
Add Fuchsia to actually_monotonic

Fuchsia provides a fully monotonic clock.

Fix https://github.com/rust-lang/rust/issues/64196

cc @joshlf @tmandry

r? @alexcrichton
2019-09-06 09:36:49 +02:00
Mazdak Farrokhzad
77e736ac27 Rollup merge of #64186 - alexcrichton:improve-env-codegen, r=sfackler
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-06 09:36:46 +02:00
Mazdak Farrokhzad
5b995397db Rollup merge of #63676 - newpavlov:wasi, r=alexcrichton
Use wasi crate for Core API

Blocked by: CraneStation/rust-wasi#5

Blocks: rust-lang/libc#1461

cc @sunfishcode @alexcrichton
2019-09-06 09:36:36 +02:00
Taylor Cramer
bb1e42599d Add Fuchsia to actually_monotonic
Fuchsia provides a fully monotonic clock.
2019-09-05 16:44:22 -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
Mazdak Farrokhzad
5649131423 Rollup merge of #64030 - jethrogb:jb/sgx-sync-issues, r=alexcrichton
Fix unlock ordering in SGX synchronization primitives

Avoid holding spinlocks during usercalls. This should avoid deadlocks in certain pathological scheduling cases.

cc @mzohreva @parthsane

r? @alexcrichton
2019-09-05 12:11:10 +02:00
Baoshan Pang
db576f8103 vxWorks: set DEFAULT_MIN_STACK_SIZE to 256K and use min_stack to pass initial stack size to rtpSpawn 2019-09-01 19:20:37 -07:00
bors
fba38ac27e Auto merge of #64025 - Wind-River:master_003, r=alexcrichton
remove directory libstd/sys/vxworks/backtrace which is not used any more

r? @alexcrichton
cc @n-salim
2019-08-31 16:19:10 +00:00
Jethro Beekman
3c4d157c84 Fix unlock ordering in SGX synchronization primitives 2019-08-30 20:35:27 -07:00
Tyler Mandry
5f91ad0e33 fuchsia: Fix default environment behavior when spawning 2019-08-30 18:52:26 -07:00
Tyler Mandry
7bfa2be4ef fuchsia: Don't fail to spawn if no stdin exists 2019-08-30 18:22:49 -07:00
Baoshan Pang
533a356c49 remove directory libstd/sys/vxworks/backtrace which is not used any more 2019-08-30 13:47:17 -07:00
Tyler Mandry
403701f976 Don't try to use /dev/null on Fuchsia 2019-08-30 11:55:34 -07:00
newpavlov
9fd203a01e simplify code 2019-08-30 17:30:33 +03:00
Tyler Mandry
5da1123c5e Update zx_time_t to an i64 2019-08-29 17:51:50 -07:00
newpavlov
6374b8458f update to wasi v0.7 2019-08-29 20:13:15 +03:00
Mazdak Farrokhzad
d920aa0e02 Rollup merge of #63979 - alexcrichton:remove-wasm-syscall, r=dtolnay
std: Remove the `wasm_syscall` feature

This commit removes the `wasm_syscall` feature from the
wasm32-unknown-unknown build of the standard library. This feature was
originally intended to allow an opt-in way to interact with the
operating system in a posix-like way but it was never stabilized.
Nowadays with the advent of the `wasm32-wasi` target that should
entirely replace the intentions of the `wasm_syscall` feature.
2019-08-29 17:14:03 +02:00
Mazdak Farrokhzad
f0e2895cf8 Rollup merge of #63963 - Wind-River:master_003, r=alexcrichton
remove the reference to __cxa_thread_atexit_impl

r? @alexcrichton

cc @n-salim
2019-08-29 05:32:53 +02:00
Alex Crichton
8fe65da935 std: Remove the wasm_syscall feature
This commit removes the `wasm_syscall` feature from the
wasm32-unknown-unknown build of the standard library. This feature was
originally intended to allow an opt-in way to interact with the
operating system in a posix-like way but it was never stabilized.
Nowadays with the advent of the `wasm32-wasi` target that should
entirely replace the intentions of the `wasm_syscall` feature.
2019-08-28 08:34:31 -07:00
Baoshan Pang
3b2c14736d remove the reference to __cxa_thread_atexit_impl 2019-08-27 10:13:59 -07:00
Mazdak Farrokhzad
9eeb7d566e Rollup merge of #63836 - Wind-River:master_003, r=alexcrichton
VxWorks does not provide a way to set the task name except at creation time

Make set_name do thing as VxWorks does not provide a way to set the task name except at creation time.

r? @alexcrichton

cc @n-salim
2019-08-26 23:55:46 +02:00
Artyom Pavlov
37721461d4 Merge branch 'master' into wasi 2019-08-24 22:50:20 +00:00
bors
4993524682 Auto merge of #63814 - malbarbo:wasi-error-kind, r=alexcrichton
Implement decode_error_kind for wasi

Based on the implementation for unix targets,
2019-08-23 22:09:07 +00:00
Baoshan Pang
912feabfc2 VxWorks does not provide a way to set the task name except at creation time 2019-08-23 14:39:38 -07:00
Marco A L Barbosa
c8838efe35 Implement decode_error_kind for wasi
Based on the implementation for unix targets
2019-08-23 10:48:38 -03:00
bors
f834695781 Auto merge of #63521 - newpavlov:redox_builder, r=pietroalbini
Re-enable Redox builder (take 2)

Closes: #63160
2019-08-23 08:58:24 +00:00
newpavlov
926f36400f move cvt 2019-08-21 19:36:12 +03:00
newpavlov
a47e3c077c fixes 2019-08-21 17:57:22 +03:00
newpavlov
88fd9450aa update args 2019-08-21 04:16:05 +03:00
newpavlov
4dee102a67 use new get_args 2019-08-20 19:16:01 +03:00
newpavlov
7daf890d75 Merge branch 'master' into wasi 2019-08-20 19:04:16 +03:00
Mazdak Farrokhzad
3662a9fb04 Rollup merge of #63723 - josephlr:sigemptyset, r=alexcrichton
Consolidate sigemptyset workarounds

In sys/unix/process, we work around the sigemptyset linking issues
on android in two different ways. This change consolidates these
workarounds, and avoids duplicating bindings from `libc`.
2019-08-20 16:26:41 +02:00
newpavlov
744442d19a fix C incompatibilities 2019-08-20 15:43:34 +03:00
Artyom Pavlov
e500fc3171 Merge branch 'master' into redox_builder 2019-08-20 10:08:57 +00:00
Joe Richey
8e91dca596 Consolidate sigemptyset workarounds
In sys/unix/process, we work around the sigemptyset linking issues
on android in two different ways. This change consolidates these
workarounds, and avoids duplicating bindings from `libc`.
2019-08-19 16:15:34 -07:00
Mazdak Farrokhzad
ac34594209 Rollup merge of #63704 - Wind-River:master, r=Centril
Fixed: error: unnecessary trailing semicolon
2019-08-19 22:48:59 +02:00
Artyom Pavlov
34c9f8c649 remove any from cfgs 2019-08-19 20:02:50 +00:00
Artyom Pavlov
1dd2d3076d cfg fix 2 2019-08-19 20:01:02 +00:00
Artyom Pavlov
1417f53863 fix cfg 2019-08-19 19:58:35 +00:00
newpavlov
c05237686f fix 2019-08-19 16:01:21 +03:00
newpavlov
e5ba80a87c use const 2019-08-19 15:36:30 +03:00
newpavlov
7658a13c65 typo fix 2019-08-19 15:33:05 +03:00
newpavlov
338fc7d042 use non-zero clock id 2019-08-19 15:32:37 +03:00
newpavlov
8394dbba7a remove libc import 2019-08-19 15:18:39 +03:00
newpavlov
52d2871e10 use wasi::get_environ 2019-08-19 15:18:02 +03:00
newpavlov
7a4f0aece8 use wasi::get_args 2019-08-19 14:54:37 +03:00
newpavlov
75a553fa27 remove to_string 2019-08-19 13:50:22 +03:00