about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm_util.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-05-10 03:11:05 +0000
committerbors <bors@rust-lang.org>2022-05-10 03:11:05 +0000
commit87fd70c107b23fe08336a12a20a0f5e85561d499 (patch)
tree997f3eb1fa15a33db5dd604227aa031dca1a94ec /compiler/rustc_codegen_llvm/src/llvm_util.rs
parent362010d6be0e551fa35c6e0488abb18686b2add4 (diff)
parent5f4b174de28e5a07c9924d69af2c018048676956 (diff)
downloadrust-87fd70c107b23fe08336a12a20a0f5e85561d499.tar.gz
rust-87fd70c107b23fe08336a12a20a0f5e85561d499.zip
Auto merge of #96803 - jyn514:faster-assemble, r=Mark-Simulacrum
Make "Assemble stage1 compiler" orders of magnitude faster

This used to take upwards of 5 seconds for me locally. I found that the culprit was copying the downloaded LLVM shared object:
```
[22:28:03] Install "/home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/ci-llvm/lib/libLLVM-14-rust-1.62.0-nightly.so" to "/home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libLLVM-14-rust-1.62.0-nightly.so"
[22:28:09]   c Sysroot { compiler: Compiler { stage: 1, host: x86_64-unknown-linux-gnu(x86_64-unknown-linux-gnu) } }
```

It turned out that `install()` used full copies unconditionally. Change it to try using a hard-link before falling back to copying.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
0 files changed, 0 insertions, 0 deletions