Skip to content
Permalink
Browse files

really_init cmdline args on Miri

  • Loading branch information
RalfJung committed Nov 29, 2019
1 parent d99e0c6 commit f621c252ec82baae0b81a03b4e5b7a59703ffcee
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/libstd/sys/unix/args.rs
@@ -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);
}

0 comments on commit f621c25

Please sign in to comment.
You can’t perform that action at this time.