Skip to content

Commit

Permalink
Auto merge of #66873 - RalfJung:miri-args, r=dtolnay
Browse files Browse the repository at this point in the history
really_init cmdline args on Miri

r? @joshtriplett

Closes #66862.
  • Loading branch information
bors committed Nov 30, 2019
2 parents 9081929 + f621c25 commit 8f1bbd6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/libstd/sys/unix/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,13 @@ mod imp {

#[inline(always)]
pub unsafe fn init(_argc: isize, _argv: *const *const u8) {
#[cfg(not(all(target_os = "linux", target_env = "gnu")))]
// On Linux-GNU, we rely on `ARGV_INIT_ARRAY` below to initialize
// `ARGC` and `ARGV`. But in Miri that does not actually happen so we
// still initialize here.
#[cfg(any(
miri,
not(all(target_os = "linux", target_env = "gnu"))
))]
really_init(_argc, _argv);
}

Expand Down

0 comments on commit 8f1bbd6

Please sign in to comment.