Skip to content
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

bootstrap: add rust.std-features config #130241

Closed
wants to merge 258 commits into from

Conversation

shrirambalaji
Copy link
Contributor

@shrirambalaji shrirambalaji commented Sep 11, 2024

Adding support for a std-features config under the rust section in config.toml during bootstrap. This allows rustc devs to build with specific feature flags for local development.

Fixes #129599

@rustbot
Copy link
Collaborator

rustbot commented Sep 11, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @albertlarsan68 (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Sep 11, 2024
@rust-log-analyzer

This comment has been minimized.

src/bootstrap/src/lib.rs Outdated Show resolved Hide resolved
src/bootstrap/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Member

@onur-ozkan onur-ozkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

If you could write the PR description instead of leaving it empty that would be great!

config.example.toml Outdated Show resolved Hide resolved
src/bootstrap/src/lib.rs Outdated Show resolved Hide resolved
@onur-ozkan
Copy link
Member

r? onur-ozkan

@rustbot rustbot assigned onur-ozkan and unassigned albertlarsan68 Sep 12, 2024
@onur-ozkan onur-ozkan added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 14, 2024
@shrirambalaji shrirambalaji changed the title [draft] bootstrap: add std_features config to rust section [draft] bootstrap: add std_features config Sep 14, 2024
@shrirambalaji shrirambalaji changed the title [draft] bootstrap: add std_features config bootstrap: add std_features config Sep 14, 2024
@shrirambalaji shrirambalaji marked this pull request as ready for review September 14, 2024 20:17
@rustbot
Copy link
Collaborator

rustbot commented Sep 14, 2024

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

This PR modifies config.example.toml.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@shrirambalaji
Copy link
Contributor Author

@rustbot review

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 14, 2024
@rust-log-analyzer

This comment has been minimized.

src/bootstrap/src/core/config/config.rs Outdated Show resolved Hide resolved
src/bootstrap/src/lib.rs Outdated Show resolved Hide resolved
config.example.toml Outdated Show resolved Hide resolved
@onur-ozkan onur-ozkan added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 15, 2024
glowcoil and others added 24 commits October 6, 2024 09:47
Fix references to a nonexistent `consume` function in the doc comments
for `Peekable::next_if` and `Peekable::next_if_eq`.
The optimized clone method ends up as the following MIR:

```
_2 = copy ((*_1).0: i32);
_3 = copy ((*_1).1: u64);
_4 = copy ((*_1).2: [i8; 3]);
_0 = Foo { a: move _2, b: move _3, c: move _4 };
```

We can transform this to:

```
_0 = copy (*_1);
```
By moving `block_on` to an auxiliary crate, we avoid having to keep a separate
copy of it in every async test.

(This also incorporates some small tweaks to the headers in `await_ready.rs`.)
This does change the external interface, but not in a way that will
cause any breakage because external users don't mention the lifetimes.
Giving them more typical names.
- Replace non-standard names like 's, 'p, 'rg, 'ck, 'parent, 'this, and
  'me with vanilla 'a. These are cases where the original name isn't
  really any more informative than 'a.
- Replace names like 'cx, 'mir, and 'body with vanilla 'a when the lifetime
  applies to multiple fields and so the original lifetime name isn't
  really accurate.
- Put 'tcx last in lifetime lists, and 'a before 'b.
Failing to do this results in the lint example output complaining
about the lint not existing instead of the thing the lint is supposed
to be complaining about.
bootstrap: add std_features  to config.example

fix: use BTreeSet for std-features; add unit tests

* fix formatting of string in front of std_features
* rename `std_features` to `std-features` in config.toml

fix: remove space before std-features in config.toml

fix: remove explicit .into_iter conversion

bootstrap: add details for rust.std-features in config.example.toml

Co-authored-by: Onur Özkan <onurozkan.dev@outlook.com>

fix: remove `Option<T>` from `rust_std_features`

fix: move default rust_std_features to config

fix: make std_features CI rustc incompatible
@rustbot
Copy link
Collaborator

rustbot commented Oct 6, 2024

Some changes occurred in match checking

cc @Nadrieril

Some changes occurred in coverage tests.

cc @Zalathar

triagebot.toml has been modified, there may have been changes to the review queue.

cc @davidtwco, @wesleywiser

Some changes occurred in src/librustdoc/clean/types.rs

cc @camelid

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

Some changes occurred in coverage instrumentation.

cc @Zalathar

This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp.

Portable SIMD is developed in its own repository. If possible, consider making this change to rust-lang/portable-simd instead.

cc @calebzulawski, @programmerjake

Some changes occurred in src/tools/opt-dist

cc @Kobzol

Some changes occurred in src/doc/rustc/src/platform-support

cc @Noratrieb

Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter
gets adapted for the changes, if necessary.

cc @rust-lang/miri

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

Some changes occurred in exhaustiveness checking

cc @Nadrieril

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

These commits modify the library/Cargo.lock file. Unintentional changes to library/Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

The Miri subtree was changed

cc @rust-lang/miri

changes to the core type system

cc @compiler-errors, @lcnr

This PR modifies src/bootstrap/defaults.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

This PR modifies tests/run-make/. If this PR is trying to port a Makefile
run-make test to use rmake.rs, please update the
run-make port tracking issue
so we can track our progress. You can either modify the tracking issue
directly, or you can comment on the tracking issue and link this PR.

cc @jieyouxu

Some changes occurred in src/tools/compiletest

cc @jieyouxu

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

Some changes occurred in compiler/rustc_sanitizers

cc @rust-lang/project-exploit-mitigations, @rcvalle

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

These commits modify compiler targets.
(See the Target Tier Policy.)

This PR changes MIR

cc @oli-obk, @RalfJung, @JakobDegen, @davidtwco, @celinval, @vakaras

The run-make-support library was changed

cc @jieyouxu

Some changes occurred to the platform-builtins intrinsics. Make sure the
LLVM backend as well as portable-simd gets adapted for the changes.

cc @antoyo, @GuillaumeGomez, @bjorn3, @calebzulawski, @programmerjake

rustdoc-json-types is a public (although nightly-only) API. If possible, consider changing src/librustdoc/json/conversions.rs; otherwise, make sure you bump the FORMAT_VERSION constant.

cc @CraftSpider, @aDotInTheVoid, @Enselic, @obi1kenobi

Some changes occurred in engine.rs, potentially modifying the public API of ObligationCtxt.

cc @lcnr, @compiler-errors

HIR ty lowering was modified

cc @fmease

@shrirambalaji
Copy link
Contributor Author

seemed to have botched the squash :/

@shrirambalaji shrirambalaji deleted the issue-129599-fix branch October 6, 2024 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

handle std features with a new option in config.toml