Skip to content

Commit 48bf61f

Browse files
authored
Add remark on required free disk space (rust-lang#2073)
1 parent a8a77cb commit 48bf61f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/building/how-to-build-and-run.md

+14
Original file line numberDiff line numberDiff line change
@@ -367,4 +367,18 @@ everything up then you only need to run one command!
367367
`rm -rf build` works too, but then you have to rebuild LLVM, which can take
368368
a long time even on fast computers.
369369

370+
## Remarks on disk space
371+
372+
Building the compiler (especially if beyond stage 1) can require significant amounts of free disk
373+
space, possibly around 100GB. This is compounded if you have a separate build directory for
374+
rust-analyzer (e.g. `build-rust-analyzer`). This is easy to hit with dev-desktops which have a [set
375+
disk
376+
quota](https://github.com/rust-lang/simpleinfra/blob/8a59e4faeb75a09b072671c74a7cb70160ebef50/ansible/roles/dev-desktop/defaults/main.yml#L7)
377+
for each user, but this also applies to local development as well. Occassionally, you may need to:
378+
379+
- Remove `build/` directory.
380+
- Remove `build-rust-analyzer/` directory (if you have a separate rust-analyzer build directory)
381+
- Uninstall unnecessary toolchains if you use `cargo-bisect-rustc`. You can check which toolchains
382+
are installed with `rustup toolchain list`.
383+
370384
[^1]: issue[#1707](https://github.com/rust-lang/rustc-dev-guide/issues/1707)

0 commit comments

Comments
 (0)