diff options
| author | Thalia Archibald <thalia@archibald.dev> | 2025-04-12 03:01:00 -0700 |
|---|---|---|
| committer | Thalia Archibald <thalia@archibald.dev> | 2025-04-13 14:35:22 -0700 |
| commit | c1f0498e656665df438178bfd39ce75e321f191f (patch) | |
| tree | 0e5471c2fb4191d6a97c78b5dfb812eb4faac0ec /library/std/src/sys/args/mod.rs | |
| parent | 092a284ba0421695f2032c947765429fd7095796 (diff) | |
| download | rust-c1f0498e656665df438178bfd39ce75e321f191f.tar.gz rust-c1f0498e656665df438178bfd39ce75e321f191f.zip | |
Hermit: Unify std::env::args with Unix
The only differences between these implementations are that Unix uses relaxed ordering, but Hermit uses acquire/release, and Unix truncates `argv` at the first null pointer, but Hermit doesn't. Since Hermit aims for Unix compatibility, unify it with Unix.
Diffstat (limited to 'library/std/src/sys/args/mod.rs')
| -rw-r--r-- | library/std/src/sys/args/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/std/src/sys/args/mod.rs b/library/std/src/sys/args/mod.rs index f24d6eb123e..6a37b32d229 100644 --- a/library/std/src/sys/args/mod.rs +++ b/library/std/src/sys/args/mod.rs @@ -3,15 +3,15 @@ #![forbid(unsafe_op_in_unsafe_fn)] cfg_if::cfg_if! { - if #[cfg(all(target_family = "unix", not(any(target_os = "espidf", target_os = "vita"))))] { + if #[cfg(any( + all(target_family = "unix", not(any(target_os = "espidf", target_os = "vita"))), + target_os = "hermit", + ))] { mod unix; pub use unix::*; } else if #[cfg(target_family = "windows")] { mod windows; pub use windows::*; - } else if #[cfg(target_os = "hermit")] { - mod hermit; - pub use hermit::*; } else if #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))] { mod sgx; pub use sgx::*; |
