@@ -20,6 +20,42 @@ your `.git/hooks` folder as `pre-push` (without the `.sh` extension!).
20
20
21
21
You can also install the hook as a step of running ` ./x setup ` !
22
22
23
+ ## Config extensions
24
+
25
+ When working on different tasks, you might need to switch between different bootstrap configurations.
26
+ Sometimes you may want to keep an old configuration for future use. But saving raw config values in
27
+ random files and manually copying and pasting them can quickly become messy, especially if you have a
28
+ long history of different configurations.
29
+
30
+ To simplify managing multiple configurations, you can create config extensions.
31
+
32
+ For example, you can create a simple config file named ` cross.toml ` :
33
+
34
+ ``` toml
35
+ [build ]
36
+ build = " x86_64-unknown-linux-gnu"
37
+ host = [" i686-unknown-linux-gnu" ]
38
+ target = [" i686-unknown-linux-gnu" ]
39
+
40
+
41
+ [llvm ]
42
+ download-ci-llvm = false
43
+
44
+ [target .x86_64-unknown-linux-gnu ]
45
+ llvm-config = " /path/to/llvm-19/bin/llvm-config"
46
+ ```
47
+
48
+ Then, include this in your ` bootstrap.toml ` :
49
+
50
+ ``` toml
51
+ include = [" cross.toml" ]
52
+ ```
53
+
54
+ You can also include extensions within extensions recursively.
55
+
56
+ ** Note:** In the ` include ` field, the overriding logic follows a right-to-left order. Also, the outer
57
+ extension/config always overrides the inner ones.
58
+
23
59
## Configuring ` rust-analyzer ` for ` rustc `
24
60
25
61
### Project-local rust-analyzer setup
0 commit comments