about summary refs log tree commit diff
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2024-09-23 20:11:47 +0800
committerGitHub <noreply@github.com>2024-09-23 20:11:47 +0800
commitf5f679e7763c4354cc15e48c069351043c4786f7 (patch)
tree1b42f74400f6b2d61846c35e982f66ff1c4b621b
parent5779d91dec200d9c055bf85c46155563bde44bc5 (diff)
downloadrust-f5f679e7763c4354cc15e48c069351043c4786f7.tar.gz
rust-f5f679e7763c4354cc15e48c069351043c4786f7.zip
Add remark on required free disk space (#2073)
-rw-r--r--src/doc/rustc-dev-guide/src/building/how-to-build-and-run.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/doc/rustc-dev-guide/src/building/how-to-build-and-run.md b/src/doc/rustc-dev-guide/src/building/how-to-build-and-run.md
index 893a524d1fb..5df76584d72 100644
--- a/src/doc/rustc-dev-guide/src/building/how-to-build-and-run.md
+++ b/src/doc/rustc-dev-guide/src/building/how-to-build-and-run.md
@@ -367,4 +367,18 @@ everything up then you only need to run one command!
 `rm -rf build` works too, but then you have to rebuild LLVM, which can take
 a long time even on fast computers.
 
+## Remarks on disk space
+
+Building the compiler (especially if beyond stage 1) can require significant amounts of free disk
+space, possibly around 100GB. This is compounded if you have a separate build directory for
+rust-analyzer (e.g. `build-rust-analyzer`). This is easy to hit with dev-desktops which have a [set
+disk
+quota](https://github.com/rust-lang/simpleinfra/blob/8a59e4faeb75a09b072671c74a7cb70160ebef50/ansible/roles/dev-desktop/defaults/main.yml#L7)
+for each user, but this also applies to local development as well. Occassionally, you may need to:
+
+- Remove `build/` directory.
+- Remove `build-rust-analyzer/` directory (if you have a separate rust-analyzer build directory)
+- Uninstall unnecessary toolchains if you use `cargo-bisect-rustc`. You can check which toolchains
+  are installed with `rustup toolchain list`.
+
 [^1]: issue[#1707](https://github.com/rust-lang/rustc-dev-guide/issues/1707)