Commit b5dd3d4
authored
Rollup merge of rust-lang#126472 - onur-ozkan:improve-libcxx-build, r=Kobzol
build `libcxx-version` only when it doesn't exist
In rust-lang#126423, it seems like c++ parsing takes quite amount of time on bootstrap startups. This PR makes libcxx-version to be compiled only when it doesn't exist.
A simple demonstration on the overhead of buiding `libcxx-version`:
```sh
$ rm -rf build/host/libcxx-version
$ x build
Building bootstrap
Finished `dev` profile [unoptimized] target(s) in 0.07s
----- LIBCXX VERSION CHECK TOOK: 509ms
Building tool rustdoc (stage1 -> stage2, x86_64-unknown-linux-gnu)
Finished `release` profile [optimized] target(s) in 0.25s
Build completed successfully in 0:00:02
$ x build
Building bootstrap
Finished `dev` profile [unoptimized] target(s) in 0.07s
----- LIBCXX VERSION CHECK TOOK: 2ms
Creating a sysroot for stage2 compiler (use `rustup toolchain link 'name' build/host/stage2`)
Building tool rustdoc (stage1 -> stage2, x86_64-unknown-linux-gnu)
Finished `release` profile [optimized] target(s) in 0.14s
Build completed successfully in 0:00:01
```2 files changed
+22
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
823 | 823 | | |
824 | 824 | | |
825 | 825 | | |
826 | | - | |
827 | | - | |
| 826 | + | |
828 | 827 | | |
829 | | - | |
830 | | - | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
831 | 836 | | |
832 | | - | |
833 | | - | |
| 837 | + | |
| 838 | + | |
834 | 839 | | |
835 | | - | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
836 | 843 | | |
837 | | - | |
838 | | - | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
839 | 849 | | |
840 | 850 | | |
841 | 851 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
131 | 134 | | |
132 | 135 | | |
133 | 136 | | |
| |||
0 commit comments