-
Notifications
You must be signed in to change notification settings - Fork 13.3k
support config extensions #138934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support config extensions #138934
Conversation
The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes. cc @BoxyUwU, @jieyouxu, @Kobzol This PR modifies If appropriate, please update |
Some thoughts (aside from the fact that I like this feature):
|
Rerolling review due to bandwidth because I'm still slowly testing #119899. |
r? kobzol Will take a look tomorrow. |
I haven't looked too closely, but based on description
can this infinite loop? I guess even if it does, just don't do that 😆 |
I'm planning to rework on this next week. @rustbot author |
That's not actually true. I keep my config file outside the rust repository and invoke |
Ah, sorry, I didn't consider that case (I didn't know that was even an option). |
6504079
to
c7b6606
Compare
c7b6606
to
13fcf1c
Compare
This PR modifies If appropriate, please update |
@rustbot ready |
dd1536d
to
586efa1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks simple enough. I think that we should also mark profile
as deprecated and just replace it with include = ["src/bootstrap/defaults/<profile>"]
, and then remove it sometime in the future. Both to avoid having two ways of achieving a similar thing, and also to make the contents of the profiles more discoverable, before it was not at all obvious what does profile = "compiler"
mean and from where it is taken.
586efa1
to
ad2e4a4
Compare
12de52b
to
ac7d1be
Compare
@bors try |
… r=<try> support config extensions _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`: > >```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`: > >```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
@rustbot ready |
☀️ Try build successful - checks-actions |
@bors r+ |
Thanks for adding the test helper function! |
…s, r=Kobzol support config extensions _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`: > >```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`: > >```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
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#137454 (not lint break with label and unsafe block) - rust-lang#138934 (support config extensions) - rust-lang#139297 (Deduplicate & clean up Nix shell) - rust-lang#139834 (Don't canonicalize crate paths) - rust-lang#139868 (Move `pal::env` into `std::sys::env_consts`) - rust-lang#139978 (Add citool command for generating a test dashboard) - rust-lang#140000 (skip llvm-config in autodiff check builds, when its unavailable) - rust-lang#140007 (Disable has_thread_local on i686-win7-windows-msvc) r? `@ghost` `@rustbot` modify labels: rollup
…s, r=Kobzol support config extensions _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`: > >```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`: > >```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
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#137454 (not lint break with label and unsafe block) - rust-lang#138934 (support config extensions) - rust-lang#139297 (Deduplicate & clean up Nix shell) - rust-lang#139834 (Don't canonicalize crate paths) - rust-lang#139978 (Add citool command for generating a test dashboard) - rust-lang#140000 (skip llvm-config in autodiff check builds, when its unavailable) - rust-lang#140007 (Disable has_thread_local on i686-win7-windows-msvc) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#137454 (not lint break with label and unsafe block) - rust-lang#138934 (support config extensions) - rust-lang#139297 (Deduplicate & clean up Nix shell) - rust-lang#139834 (Don't canonicalize crate paths) - rust-lang#139978 (Add citool command for generating a test dashboard) - rust-lang#140000 (skip llvm-config in autodiff check builds, when its unavailable) - rust-lang#140007 (Disable has_thread_local on i686-win7-windows-msvc) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#137454 (not lint break with label and unsafe block) - rust-lang#138934 (support config extensions) - rust-lang#139297 (Deduplicate & clean up Nix shell) - rust-lang#139834 (Don't canonicalize crate paths) - rust-lang#139978 (Add citool command for generating a test dashboard) - rust-lang#140000 (skip llvm-config in autodiff check builds, when its unavailable) - rust-lang#140007 (Disable has_thread_local on i686-win7-windows-msvc) r? `@ghost` `@rustbot` modify labels: rollup
…enton Rollup of 8 pull requests Successful merges: - rust-lang#138934 (support config extensions) - rust-lang#139091 (Rewrite on_unimplemented format string parser.) - rust-lang#139753 (Make `#[naked]` an unsafe attribute) - rust-lang#139762 (Don't assemble non-env/bound candidates if projection is rigid) - rust-lang#139834 (Don't canonicalize crate paths) - rust-lang#139868 (Move `pal::env` to `std::sys::env_consts`) - rust-lang#139978 (Add citool command for generating a test dashboard) - rust-lang#139995 (Clean UI tests 4 of n) r? `@ghost` `@rustbot` modify labels: rollup
…enton Rollup of 8 pull requests Successful merges: - rust-lang#138934 (support config extensions) - rust-lang#139091 (Rewrite on_unimplemented format string parser.) - rust-lang#139753 (Make `#[naked]` an unsafe attribute) - rust-lang#139762 (Don't assemble non-env/bound candidates if projection is rigid) - rust-lang#139834 (Don't canonicalize crate paths) - rust-lang#139868 (Move `pal::env` to `std::sys::env_consts`) - rust-lang#139978 (Add citool command for generating a test dashboard) - rust-lang#139995 (Clean UI tests 4 of n) r? `@ghost` `@rustbot` modify labels: rollup
…enton Rollup of 8 pull requests Successful merges: - rust-lang#138934 (support config extensions) - rust-lang#139091 (Rewrite on_unimplemented format string parser.) - rust-lang#139753 (Make `#[naked]` an unsafe attribute) - rust-lang#139762 (Don't assemble non-env/bound candidates if projection is rigid) - rust-lang#139834 (Don't canonicalize crate paths) - rust-lang#139868 (Move `pal::env` to `std::sys::env_consts`) - rust-lang#139978 (Add citool command for generating a test dashboard) - rust-lang#139995 (Clean UI tests 4 of n) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#138934 - onur-ozkan:extended-config-profiles, r=Kobzol support config extensions _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`: > >```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`: > >```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
…enton Rollup of 8 pull requests Successful merges: - rust-lang#138934 (support config extensions) - rust-lang#139091 (Rewrite on_unimplemented format string parser.) - rust-lang#139753 (Make `#[naked]` an unsafe attribute) - rust-lang#139762 (Don't assemble non-env/bound candidates if projection is rigid) - rust-lang#139834 (Don't canonicalize crate paths) - rust-lang#139868 (Move `pal::env` to `std::sys::env_consts`) - rust-lang#139978 (Add citool command for generating a test dashboard) - rust-lang#139995 (Clean UI tests 4 of n) r? `@ghost` `@rustbot` modify labels: rollup
Copied from the
rustc-dev-guide
addition:try-job: x86_64-mingw-2