about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/transform/coverage/debug.rs
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2021-07-19 11:37:45 +0200
committerGitHub <noreply@github.com>2021-07-19 11:37:45 +0200
commit6df9df7e36ca40e8e30e107761e8d2763fc13864 (patch)
tree73cfe23ff1117e6215513c3150d929f271d64188 /compiler/rustc_mir/src/transform/coverage/debug.rs
parent65b7aa98c7b3575230eb41e95c7444f0056811dd (diff)
parentc3df0ae97f9c03ce5937b9677c27da891a4a0fe0 (diff)
downloadrust-6df9df7e36ca40e8e30e107761e8d2763fc13864.tar.gz
rust-6df9df7e36ca40e8e30e107761e8d2763fc13864.zip
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 91c3eee1735ad72b579f99cbb6919c3471747d94, 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.
Diffstat (limited to 'compiler/rustc_mir/src/transform/coverage/debug.rs')
0 files changed, 0 insertions, 0 deletions