Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #87236 - sunfishcode:avoid-locking-args, r=joshtriplett
Simplify command-line argument initialization on unix Simplify Rust's command-line argument initialization code on unix: - The cleanup code isn't needed, because it was just zeroing out non-owning variables at runtime cleanup time. After 91c3eee, Rust's command-line initialization code on unix no longer allocates `CString`s and a `Vec` at startup time. - The `Mutex` isn't needed; if there's somehow a call to `args()` before argument initialization has happened, the code returns return an empty list, which we can do with a null check. With these changes, a simple cdylib that doesn't use threads avoids getting `pthread_mutex_lock`/`pthread_mutex_unlock` in its symbol table.
- Loading branch information