Uh oh!
There was an error while loading. Please reload this page.
rustbuild fixes - #66834
Conversation
rust-highfive
commented
Nov 28, 2019
(rust_highfive has picked a reviewer for you, use r? to override) |
rust-highfive
commented
Nov 28, 2019
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
There was a problem hiding this comment.
Is it plausible that this should happen for the other steps here? If so, we can likely achieve that by changing the macro a bit.
Currently it has:
run.builder.ensure($name {
compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
target: run.target,});For "only_hosts" steps, this will run with target = host for each host already. I think then the only difference is previously we were running the dist::Rustc step always with the "build" triple compiler, whereas the new code runs it with the host triple compiler. If I understand what's going on, then the code you've added could also be something like this, and without the loop, and still work.
builder.ensure(dist::Rustc{compiler: builder.compiler(builder.top_stage,self.target),});install_rustc(builder,self.compiler.stage,self.target);There was a problem hiding this comment.
Thanks for the alternate suggestion. I've verified this works and updated my commits.
although, not sure why this works - it wasn't needed before
Mark-Simulacrum
commented
Dec 1, 2019
I'm going to @bors r+ this. However, I think it would be good to try to go a bit further if you have the time with the install.rs file and try and get a framework of some kind for what the intent is behind our mix of only_hosts/target/host installs; currently it seems to be rather ad-hoc (basically each one does something a little different it looks like). I think unifying that is likely a good goal, though I'm not sure how we'd do so -- maybe inspiration from other compiler installers can be taken, or rustup itself. I don't have the time to do much more than review though :) |
bors
commented
Dec 1, 2019
📌 Commit 0533249 has been approved by |
bors
commented
Dec 1, 2019
🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened |
rustbuild fixes
When upgrading Debian's rustc to 1.38 I needed these patches:
(1) In order to cross-compile rustc 1.38 and take it through the full rustbuild process including install, I needed the first patch.
(2) In order to build rustc 1.38 using rustc 1.38 itself I need to set --cap-lints warn, otherwise I get this error:
~~~~
error: unnecessary `unsafe` block
--> src/bootstrap/builder.rs:148:19
|
148 | name: unsafe { ::std::intrinsics::type_name::<S>() },
| ^^^^^^ unnecessary `unsafe` block
|
note: lint level defined here
--> src/bootstrap/lib.rs:107:9
|
107 | #![deny(warnings, rust_2018_idioms, unused_lifetimes)]
| ^^^^^^^^
= note: `#[deny(unused_unsafe)]` implied by `#[deny(warnings)]`
error: aborting due to previous error
error: could not compile `bootstrap`.
~~~~
In order to set --cap-lints warn however, I need bootstrap.py not to clobber RUSTFLAGS. (This worked previously, not sure if it was broken intentionally but we would like support for it.)rustbuild fixes
When upgrading Debian's rustc to 1.38 I needed these patches:
(1) In order to cross-compile rustc 1.38 and take it through the full rustbuild process including install, I needed the first patch.
(2) In order to build rustc 1.38 using rustc 1.38 itself I need to set --cap-lints warn, otherwise I get this error:
~~~~
error: unnecessary `unsafe` block
--> src/bootstrap/builder.rs:148:19
|
148 | name: unsafe { ::std::intrinsics::type_name::<S>() },
| ^^^^^^ unnecessary `unsafe` block
|
note: lint level defined here
--> src/bootstrap/lib.rs:107:9
|
107 | #![deny(warnings, rust_2018_idioms, unused_lifetimes)]
| ^^^^^^^^
= note: `#[deny(unused_unsafe)]` implied by `#[deny(warnings)]`
error: aborting due to previous error
error: could not compile `bootstrap`.
~~~~
In order to set --cap-lints warn however, I need bootstrap.py not to clobber RUSTFLAGS. (This worked previously, not sure if it was broken intentionally but we would like support for it.)rustbuild fixes
When upgrading Debian's rustc to 1.38 I needed these patches:
(1) In order to cross-compile rustc 1.38 and take it through the full rustbuild process including install, I needed the first patch.
(2) In order to build rustc 1.38 using rustc 1.38 itself I need to set --cap-lints warn, otherwise I get this error:
~~~~
error: unnecessary `unsafe` block
--> src/bootstrap/builder.rs:148:19
|
148 | name: unsafe { ::std::intrinsics::type_name::<S>() },
| ^^^^^^ unnecessary `unsafe` block
|
note: lint level defined here
--> src/bootstrap/lib.rs:107:9
|
107 | #![deny(warnings, rust_2018_idioms, unused_lifetimes)]
| ^^^^^^^^
= note: `#[deny(unused_unsafe)]` implied by `#[deny(warnings)]`
error: aborting due to previous error
error: could not compile `bootstrap`.
~~~~
In order to set --cap-lints warn however, I need bootstrap.py not to clobber RUSTFLAGS. (This worked previously, not sure if it was broken intentionally but we would like support for it.)Rollup of 5 pull requests Successful merges: - #66245 (Conditional compilation for sanitizers) - #66654 (Handle const-checks for `&mut` outside of `HasMutInterior`) - #66822 (libunwind_panic: adjust miri panic hack) - #66827 (handle diverging functions forwarding their return place) - #66834 (rustbuild fixes) Failed merges: r? @ghost
When upgrading Debian's rustc to 1.38 I needed these patches:
(1) In order to cross-compile rustc 1.38 and take it through the full rustbuild process including install, I needed the first patch.
(2) In order to build rustc 1.38 using rustc 1.38 itself I need to set --cap-lints warn, otherwise I get this error:
In order to set --cap-lints warn however, I need bootstrap.py not to clobber RUSTFLAGS. (This worked previously, not sure if it was broken intentionally but we would like support for it.)