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

Fix cross compiling dist/build invocations #76799

Merged
merged 3 commits into from
Sep 22, 2020

Conversation

Mark-Simulacrum
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum commented Sep 16, 2020

I am uncertain why the first commit is not affecting CI. I suspect it's because we pass --disable-docs on most of our cross-compilation builders. The second commit doesn't affect CI because CI runs x.py dist, not x.py build.

Both commits are standalone; together they should resolve #76733. The first commit doesn't really fix that issue but rather just fixes cross-compiled x.py dist, resolving a bug introduced in #76549.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 16, 2020
@jyn514 jyn514 added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Sep 16, 2020
@Mark-Simulacrum
Copy link
Member Author

It looks like the first commit here is presumably either an incomplete fix or something like that, https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/x.2Epy.20calls.20itself.20recursively.3F/near/210307295.

Otherwise, we may not have a standard library built for the native "host" target
of the rustc being run.
This isn't an issue for most folks who use x.py dist, which will directly depend
on this. But for x.py build, if we don't properly set target here rustdoc will
not be built.

Currently, there is not a default-on step for generating a rustc for a given
target either, so we will fail to build a rustc as well.
@Mark-Simulacrum
Copy link
Member Author

Looks like that was a false alarm -- seems like this is actually fixed (or at least that build is not evidence otherwise).

@glandium
Copy link
Contributor

I can confirm it works, but it also builds a stage1 "host" compiler with x.py build (without --stage 2). That sounds like what you wanted to avoid in the first place?

@Mark-Simulacrum
Copy link
Member Author

I think that's probably avoidable but will be a more invasive change so I'll leave it to future work (unless @alexcrichton feels we should do it here). We'll probably need to model compile::Std and other steps similar to how rustdoc is done, where they don't ask for a top_stage compiler which they don't actually need.

@alexcrichton
Copy link
Member

Seems reasonable to me, and yeah further optimizations can probably come later.

Would it be possible to add a test for this? These sorts of bugs are notoriously hard to protect against otherwise

@Mark-Simulacrum
Copy link
Member Author

Okay @alexcrichton just pushed a test, annotated with a fixme comment since it's over-building things currently

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Sep 17, 2020

📌 Commit 363aff0 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 17, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 19, 2020
…ist, r=alexcrichton

Fix cross compiling dist/build invocations

I am uncertain why the first commit is not affecting CI. I suspect it's because we pass --disable-docs on most of our cross-compilation builders. The second commit doesn't affect CI because CI runs x.py dist, not x.py build.

Both commits are standalone; together they should resolve rust-lang#76733. The first commit doesn't really fix that issue but rather just fixes cross-compiled x.py dist, resolving a bug introduced in rust-lang#76549.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 19, 2020
…ist, r=alexcrichton

Fix cross compiling dist/build invocations

I am uncertain why the first commit is not affecting CI. I suspect it's because we pass --disable-docs on most of our cross-compilation builders. The second commit doesn't affect CI because CI runs x.py dist, not x.py build.

Both commits are standalone; together they should resolve rust-lang#76733. The first commit doesn't really fix that issue but rather just fixes cross-compiled x.py dist, resolving a bug introduced in rust-lang#76549.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 19, 2020
…ist, r=alexcrichton

Fix cross compiling dist/build invocations

I am uncertain why the first commit is not affecting CI. I suspect it's because we pass --disable-docs on most of our cross-compilation builders. The second commit doesn't affect CI because CI runs x.py dist, not x.py build.

Both commits are standalone; together they should resolve rust-lang#76733. The first commit doesn't really fix that issue but rather just fixes cross-compiled x.py dist, resolving a bug introduced in rust-lang#76549.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 21, 2020
…ist, r=alexcrichton

Fix cross compiling dist/build invocations

I am uncertain why the first commit is not affecting CI. I suspect it's because we pass --disable-docs on most of our cross-compilation builders. The second commit doesn't affect CI because CI runs x.py dist, not x.py build.

Both commits are standalone; together they should resolve rust-lang#76733. The first commit doesn't really fix that issue but rather just fixes cross-compiled x.py dist, resolving a bug introduced in rust-lang#76549.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Sep 22, 2020
…ist, r=alexcrichton

Fix cross compiling dist/build invocations

I am uncertain why the first commit is not affecting CI. I suspect it's because we pass --disable-docs on most of our cross-compilation builders. The second commit doesn't affect CI because CI runs x.py dist, not x.py build.

Both commits are standalone; together they should resolve rust-lang#76733. The first commit doesn't really fix that issue but rather just fixes cross-compiled x.py dist, resolving a bug introduced in rust-lang#76549.
@ecstatic-morse
Copy link
Contributor

@bors rollup=iffy

@bors
Copy link
Contributor

bors commented Sep 22, 2020

⌛ Testing commit 363aff0 with merge 44ae0b8...

@bors
Copy link
Contributor

bors commented Sep 22, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: alexcrichton
Pushing 44ae0b8 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 22, 2020
@bors bors merged commit 44ae0b8 into rust-lang:master Sep 22, 2020
@rustbot rustbot added this to the 1.48.0 milestone Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't cross-build rustc for aarch64-apple-darwin anymore
8 participants