-
Notifications
You must be signed in to change notification settings - Fork 13.4k
handle no_std targets on std builds #128182
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
rustbot has assigned @Mark-Simulacrum. Use |
This comment has been minimized.
This comment has been minimized.
This seems to work locally on individual targets but I am getting ICEs when checking a lot of targets at once. E.g.
I've not managed to narrowed it down but it could be there's a specific other target that's causing issues when they're used together. |
Probably. |
// FIXME: Extend builder tests to cover the `crates` field of `Std` instances. | ||
if cfg!(feature = "bootstrap-self-test") { | ||
return vec![]; | ||
} |
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.
Additional context:
rust/src/bootstrap/src/core/builder/tests.rs
Lines 60 to 62 in 72d73ce
macro_rules! std { | |
($host:ident => $target:ident, stage = $stage:literal) => { | |
compile::Std::new( |
That above and doc_std
helper macros needs to be improved to mock crates
field in Std
with relevant values.
@rustbot ready |
cfe8fe2
to
47122e3
Compare
@bors r+ rollup |
…rk-Simulacrum handle no_std targets on std builds This PR unifies the `Step::run_make` logic and improves it by skipping std specific crates for no_std targets. In addition, since we now handle library crates properly, bootstrap is capable of running `x doc library` even for no_std targets as it is able to generate documentation for `alloc` crate from the standard library. Resolves rust-lang#128027 cc `@ChrisDenton`
Rollup of 4 pull requests Successful merges: - rust-lang#109174 (Replace `io::Cursor::{remaining_slice, is_empty}`) - rust-lang#128147 (migrate fmt-write-bloat to rmake) - rust-lang#128182 (handle no_std targets on std builds) - rust-lang#128310 (Add missing periods on `BTreeMap` cursor `peek_next` docs) Failed merges: - rust-lang#128269 (improve cargo invocations on bootstrap) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 4 pull requests Successful merges: - rust-lang#109174 (Replace `io::Cursor::{remaining_slice, is_empty}`) - rust-lang#128147 (migrate fmt-write-bloat to rmake) - rust-lang#128182 (handle no_std targets on std builds) - rust-lang#128310 (Add missing periods on `BTreeMap` cursor `peek_next` docs) Failed merges: - rust-lang#128269 (improve cargo invocations on bootstrap) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#109174 (Replace `io::Cursor::{remaining_slice, is_empty}`) - rust-lang#127290 (Fully document `rustdoc-json-types`) - rust-lang#128055 (std: unsafe-wrap personality::dwarf::eh) - rust-lang#128269 (improve cargo invocations on bootstrap) - rust-lang#128310 (Add missing periods on `BTreeMap` cursor `peek_next` docs) Failed merges: - rust-lang#127543 (More unsafe attr verification) - rust-lang#128182 (handle no_std targets on std builds) r? `@ghost` `@rustbot` modify labels: rollup
☔ The latest upstream changes (presumably #125443) made this pull request unmergeable. Please resolve the merge conflicts. |
47122e3
to
9e29f23
Compare
This change unifies the `Step::run_make` logic and improves it by skipping std specific crates for no_std targets. Signed-off-by: onur-ozkan <work@onurozkan.dev>
Since we now handle library crates properly, there's no need to panic for `no_std` targets anymore. `x doc library` now generates documentation for the `alloc` crate from standard library. Signed-off-by: onur-ozkan <work@onurozkan.dev>
`crates` field is handled in the `Step::make_run` just like in any other `Std` implementation, so we don't need to resolve them in `Std::new`. Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
9e29f23
to
f56d58e
Compare
Rebased. @bors r=Mark-Simulacrum |
…rk-Simulacrum handle no_std targets on std builds This PR unifies the `Step::run_make` logic and improves it by skipping std specific crates for no_std targets. In addition, since we now handle library crates properly, bootstrap is capable of running `x doc library` even for no_std targets as it is able to generate documentation for `alloc` crate from the standard library. Resolves rust-lang#128027 cc `@ChrisDenton`
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#128182 (handle no_std targets on std builds) - rust-lang#128277 (miri: fix offset_from behavior on wildcard pointers) - rust-lang#128304 (Isolate the diagnostic code that expects `thir::Pat` to be printable) - rust-lang#128307 (Clean and enable `rustdoc::unescaped_backticks` for `core/alloc/std/test/proc_macro`) - rust-lang#128322 (CI: move RFL job forward to v6.11-rc1) - rust-lang#128333 (Miri subtree update) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#128182 - onur-ozkan:fix-no-std-crates, r=Mark-Simulacrum handle no_std targets on std builds This PR unifies the `Step::run_make` logic and improves it by skipping std specific crates for no_std targets. In addition, since we now handle library crates properly, bootstrap is capable of running `x doc library` even for no_std targets as it is able to generate documentation for `alloc` crate from the standard library. Resolves rust-lang#128027 cc ``@ChrisDenton``
This fixes a regression from rust-lang#128182. Signed-off-by: onur-ozkan <work@onurozkan.dev>
This fixes a regression from rust-lang#128182. Signed-off-by: onur-ozkan <work@onurozkan.dev>
This fixes a regression from rust-lang#128182. Signed-off-by: onur-ozkan <work@onurozkan.dev>
This fixes a regression from rust-lang#128182. Signed-off-by: onur-ozkan <work@onurozkan.dev>
handle crates when they are not specified for std docs Fixes a regression from rust-lang#128182. Resolves rust-lang#128610
handle crates when they are not specified for std docs Fixes a regression from rust-lang#128182. Resolves rust-lang#128610
handle crates when they are not specified for std docs Fixes a regression from rust-lang#128182. Resolves rust-lang#128610
Rollup merge of rust-lang#128631 - onur-ozkan:hotfix, r=Mark-Simulacrum handle crates when they are not specified for std docs Fixes a regression from rust-lang#128182. Resolves rust-lang#128610
This PR unifies the
Step::run_make
logic and improves it by skipping std specific crates for no_std targets. In addition, since we now handle library crates properly, bootstrap is capable of runningx doc library
even for no_std targets as it is able to generate documentation foralloc
crate from the standard library.Resolves #128027
cc @ChrisDenton