about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorRain <rain@sunshowers.io>2022-08-19 18:24:21 -0700
committerRain <rain@sunshowers.io>2022-08-28 19:31:09 -0700
commitbd8b4b9c1588f0c681162ead34cc91b3f9a52bfc (patch)
tree430ce7b689a015dc36c2f1cc4fe731a162ff4a41 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent1ea4efd0656599f824e2567a5b7a95454f701c03 (diff)
downloadrust-bd8b4b9c1588f0c681162ead34cc91b3f9a52bfc.tar.gz
rust-bd8b4b9c1588f0c681162ead34cc91b3f9a52bfc.zip
Use posix_spawn for absolute paths on macOS
Currently, on macOS, Rust never uses the fast posix_spawn path if a
directory change is requested due to a bug in Apple's libc. However, the
bug is only triggered if the program is a relative path.

This PR makes it so that the fast path continues to work if the program
is an absolute path or a lone filename.

This was an alternative proposed in
https://github.com/rust-lang/rust/pull/80537#issue-776674009, and it
makes a measurable performance difference in some of my code that spawns
thousands of processes.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions