Skip to content

support config extensions#138934

Merged
bors merged 10 commits intorust-lang:masterfrom
onur-ozkan:extended-config-profiles
Apr 20, 2025
Merged

support config extensions#138934
bors merged 10 commits intorust-lang:masterfrom
onur-ozkan:extended-config-profiles

Conversation

@onur-ozkan
Copy link
Copy Markdown
Contributor

@onur-ozkan onur-ozkan commented Mar 25, 2025

Copied from the rustc-dev-guide addition:

When working on different tasks, you might need to switch between different bootstrap >configurations.
Sometimes you may want to keep an old configuration for future use. But saving raw config >values in
random files and manually copying and pasting them can quickly become messy, especially if >you have a
long history of different configurations.

To simplify managing multiple configurations, you can create config extensions.

For example, you can create a simple config file named cross.toml:

[build]
build = "x86_64-unknown-linux-gnu"
host = ["i686-unknown-linux-gnu"]
target = ["i686-unknown-linux-gnu"]


[llvm]
download-ci-llvm = false

[target.x86_64-unknown-linux-gnu]
llvm-config = "/path/to/llvm-19/bin/llvm-config"

Then, include this in your bootstrap.toml:

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. For example,
in include = ["a.toml", "b.toml"], extension b.toml overrides a.toml. Also, parent extensions
always overrides the inner ones.

try-job: x86_64-mingw-2

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rustc-dev-guide Area: rustc-dev-guide S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants