about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/Linker.cpp
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2025-03-05 21:46:40 +0800
committerGitHub <noreply@github.com>2025-03-05 21:46:40 +0800
commitfde23c87a55fa82378e15fa2ad7069fced1f978b (patch)
treed81398c9d10b74ed076d4ada7c6e2385f2895b79 /compiler/rustc_llvm/llvm-wrapper/Linker.cpp
parent5df9a9f45ce637e820c0e995af3fdda6da5ab01b (diff)
parentb34054511401f7aed8e76b8d5663651b5b4ced2a (diff)
downloadrust-fde23c87a55fa82378e15fa2ad7069fced1f978b.tar.gz
rust-fde23c87a55fa82378e15fa2ad7069fced1f978b.zip
Rollup merge of #137463 - sunshowers:illumos-posix-spawn, r=Mark-Simulacrum
[illumos] attempt to use posix_spawn to spawn processes

illumos has `posix_spawn`, and the very newest versions also have `_addchdir`, so use that. POSIX standardized this function so I also added a weak symbol lookup for the non `_np` version. (illumos has both.)

This probably also works on Solaris, but I don't have access to an installation to validate this so I decided to focus on illumos instead.

This is a nice ~4x performance improvement for process creation. My go-to as usual is nextest against the clap repo, which acts as a stress test for process creation -- with [this commit]:

```console
$ cargo nextest run -E 'not test(ui_tests) and not test(example_tests)'
before: Summary [   1.747s] 879 tests run: 879 passed, 2 skipped
after:  Summary [   0.445s] 879 tests run: 879 passed, 2 skipped
```

[this commit]: https://github.com/clap-rs/clap/commit/fde45f9aea766fb8de46e3d46e6575f393c3b6b9
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/Linker.cpp')
0 files changed, 0 insertions, 0 deletions