-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Add bootstrap option to compile a tool with features #142379
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
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This PR modifies If appropriate, please update This PR modifies If appropriate, please update |
r? bootstrap |
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.
Thanks, this looks simple enough. With one caveat that I would rename it from tool-config
to just tool
. Basically anything in the bootstrap.toml file is a config option in one way or another, so it seems redundant.
@rustbot ready Thanks for the review! I renamed to |
Thanks! @bors r+ rollup |
Rollup of 10 pull requests Successful merges: - #134847 (Implement asymmetrical precedence for closures and jumps) - #141491 (Delegate `<CStr as Debug>` to `ByteStr`) - #141770 (Merge `Cfg::render_long_html` and `Cfg::render_long_plain` methods common code) - #142069 (Introduce `-Zmacro-stats`) - #142158 (Tracking the old name of renamed unstable library features) - #142221 ([AIX] strip underlying xcoff object) - #142340 (miri: we can use apfloat's mul_add now) - #142379 (Add bootstrap option to compile a tool with features) - #142410 (intrinsics: rename min_align_of to align_of) - #142413 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #142379 - Stypox:bootstrap-tool-config, r=Kobzol Add bootstrap option to compile a tool with features Add an option to specify which features to build a tool with, e.g. it will be useful to build Miri with tracing enabled: ```toml tool-config.miri.features = ["tracing"] ``` See [this Zulip thread](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Passing.20--features.20to.20Miri.20build.20using.20.2E.2Fx.2Epy/with/523564773) for the options considered. If the final decision will be different than what I wrote now, I will update the code as needed. The reason why the option is `tool-config.miri.features` instead of something like `tool-features.miri` is to possibly allow adding more tool-specific configurations in the future. I didn't do any validation of the keys of the `tool-config` hashmap, since I saw that no validation is done on the `tools` hashset either. I don't like much the fact that features can be chosen by various places of the codebase: `Step`s can have some fixed `extra_features`, `prepare_tool_cargo` will add features depending on some bootstrapping options, and the newly added option can also contribute features to tools. However I think it is out of scope of this PR to try to refactor all of that (if it even is refactorable), so I left a comment in the codebase explaining all of the sources of features I could find.
Rollup of 10 pull requests Successful merges: - rust-lang/rust#134847 (Implement asymmetrical precedence for closures and jumps) - rust-lang/rust#141491 (Delegate `<CStr as Debug>` to `ByteStr`) - rust-lang/rust#141770 (Merge `Cfg::render_long_html` and `Cfg::render_long_plain` methods common code) - rust-lang/rust#142069 (Introduce `-Zmacro-stats`) - rust-lang/rust#142158 (Tracking the old name of renamed unstable library features) - rust-lang/rust#142221 ([AIX] strip underlying xcoff object) - rust-lang/rust#142340 (miri: we can use apfloat's mul_add now) - rust-lang/rust#142379 (Add bootstrap option to compile a tool with features) - rust-lang/rust#142410 (intrinsics: rename min_align_of to align_of) - rust-lang/rust#142413 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
Add an option to specify which features to build a tool with, e.g. it will be useful to build Miri with tracing enabled:
See this Zulip thread for the options considered. If the final decision will be different than what I wrote now, I will update the code as needed. The reason why the option is
tool-config.miri.features
instead of something liketool-features.miri
is to possibly allow adding more tool-specific configurations in the future.I didn't do any validation of the keys of the
tool-config
hashmap, since I saw that no validation is done on thetools
hashset either.I don't like much the fact that features can be chosen by various places of the codebase:
Step
s can have some fixedextra_features
,prepare_tool_cargo
will add features depending on some bootstrapping options, and the newly added option can also contribute features to tools. However I think it is out of scope of this PR to try to refactor all of that (if it even is refactorable), so I left a comment in the codebase explaining all of the sources of features I could find.