about summary refs log tree commit diff
diff options
context:
space:
mode:
authoronur-ozkan <work@onurozkan.dev>2025-04-01 11:53:32 +0300
committeronur-ozkan <work@onurozkan.dev>2025-04-15 11:33:06 +0300
commit78cb4538ee203b08441382b5cd64b1989ed5b3b9 (patch)
treeb067ed64bc624675ef6047fd80f06c970a1bd840
parent4e80659b32a794513646b93890c9a6eeb103de17 (diff)
downloadrust-78cb4538ee203b08441382b5cd64b1989ed5b3b9.tar.gz
rust-78cb4538ee203b08441382b5cd64b1989ed5b3b9.zip
document `include` in `bootstrap.example.toml`
Signed-off-by: onur-ozkan <work@onurozkan.dev>
-rw-r--r--bootstrap.example.toml5
-rw-r--r--src/doc/rustc-dev-guide/src/building/suggested.md5
2 files changed, 8 insertions, 2 deletions
diff --git a/bootstrap.example.toml b/bootstrap.example.toml
index 0927f648635..0a314f65ec2 100644
--- a/bootstrap.example.toml
+++ b/bootstrap.example.toml
@@ -19,6 +19,11 @@
 # Note that this has no default value (x.py uses the defaults in `bootstrap.example.toml`).
 #profile = <none>
 
+# Inherits configuration values from different configuration files (a.k.a. config extensions).
+# Supports absolute paths, and uses the current directory (where the bootstrap was invoked)
+# as the base if the given path is not absolute.
+#include = []
+
 # Keeps track of major changes made to this configuration.
 #
 # This value also represents ID of the PR that caused major changes. Meaning,
diff --git a/src/doc/rustc-dev-guide/src/building/suggested.md b/src/doc/rustc-dev-guide/src/building/suggested.md
index 5d37a78af88..b2e258be079 100644
--- a/src/doc/rustc-dev-guide/src/building/suggested.md
+++ b/src/doc/rustc-dev-guide/src/building/suggested.md
@@ -53,8 +53,9 @@ include = ["cross.toml"]
 
 You can also include extensions within extensions recursively.
 
-**Note:** In the `include` field, the overriding logic follows a right-to-left order. Also, the outer
-extension/config always overrides the inner ones.
+**Note:** In the `include` field, the overriding logic follows a right-to-left order. For example,
+in `include = ["a.toml", "b.toml"]`, extension `b.toml` overrides `a.toml`. Also, parent extensions
+always overrides the inner ones.
 
 ## Configuring `rust-analyzer` for `rustc`