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 build of std for thumbv7a-pc-windows-msvc #103989

Merged
merged 1 commit into from
Nov 19, 2022
Merged

Conversation

arlosi
Copy link
Contributor

@arlosi arlosi commented Nov 4, 2022

Attempting to build std for the tier-3 target thumbv7a-pc-windows-msvc fails with the following error:

Building stage1 std artifacts (x86_64-pc-windows-msvc -> thumbv7a-pc-windows-msvc)
..
LLVM ERROR: WinEH not implemented for this target
error: could not compile `panic_unwind`

EH (unwinding) is not supported by LLVM for 32 bit arm msvc targets. This changes panic unwind to use the dummy implementation for thumbv7a-pc-windows-msvc.

@rustbot
Copy link
Collaborator

rustbot commented Nov 4, 2022

r? @m-ou-se

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Nov 4, 2022
@rustbot
Copy link
Collaborator

rustbot commented Nov 4, 2022

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@wesleywiser wesleywiser added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Nov 14, 2022
@wesleywiser
Copy link
Member

Nominating for beta backport to fix a Tier 3 target build error.

@Amanieu
Copy link
Member

Amanieu commented Nov 16, 2022

Why did this work before? What changed?

If unwinding doesn't work on this target, wouldn't it be preferable to force it to use panic=abort instead?

@ChrisDenton
Copy link
Member

It does have the abort panic strategy:

panic_strategy: PanicStrategy::Abort,

And the following works:

./x.py build library/alloc --host x86_64-pc-windows-msvc --target thumbv7a-pc-windows-msvc --stage 1

But building library/std gives the error in the OP. So I guess building std implies building panic_unwind?

@arlosi
Copy link
Contributor Author

arlosi commented Nov 17, 2022

Bisection shows that it was caused by the LLVM 15 update - #99464.

Maybe LLVM previously generated bad unwinding code (that was unused due to panic=abort), and now LLVM errors instead?

It looked like other targets that didn't have unwinding support used the "dummy" implementation, so that what I did here.

@Amanieu
Copy link
Member

Amanieu commented Nov 17, 2022

LGTM, it seems this is what we do for all targets that don't support unwinding.

@bors r+

@wesleywiser Is a backport useful? Aren't tier-3 targets only usable with -Z build-std which is unstable?

@Amanieu Amanieu closed this Nov 17, 2022
@Amanieu Amanieu reopened this Nov 17, 2022
@Amanieu
Copy link
Member

Amanieu commented Nov 17, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Nov 17, 2022

📌 Commit 7c60236 has been approved by Amanieu

It is now in the queue for this repository.

@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 Nov 17, 2022
@wesleywiser
Copy link
Member

@Amanieu I figured since we hit this in 1.65, it might be nice to have this resolved in 1.66. It's a Tier 3 target though, so I completely understand if T-libs doesn't want to backport!

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 19, 2022
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#103117 (Use `IsTerminal` in place of `atty`)
 - rust-lang#103969 (Partial support for running UI tests with `download-rustc`)
 - rust-lang#103989 (Fix build of std for thumbv7a-pc-windows-msvc)
 - rust-lang#104076 (fix sysroot issue which appears for ci downloaded rustc)
 - rust-lang#104469 (Make "long type" printing type aware and trim types in E0275)
 - rust-lang#104497 (detect () to avoid redundant <> suggestion for type)
 - rust-lang#104577 (Don't focus on notable trait parent when hiding it)
 - rust-lang#104587 (Update cargo)
 - rust-lang#104593 (Improve spans for RPITIT object-safety errors)
 - rust-lang#104604 (Migrate top buttons style to CSS variables)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 747f29f into rust-lang:master Nov 19, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 19, 2022
@m-ou-se m-ou-se added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Dec 12, 2022
@pietroalbini pietroalbini removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Dec 12, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 12, 2022
…troalbini

[stable] Prepare 1.66.0 release

This PR prepares the artifacts for the 1.66.0 release. The following PRs have been backported:

* rust-lang#104782
* rust-lang#105023
* rust-lang#104558
* rust-lang#104610
* rust-lang#103989
* rust-lang#104650
* rust-lang#105539
* rust-lang#105477

r? `@ghost`
@Mark-Simulacrum Mark-Simulacrum removed the beta-accepted Accepted for backporting to the compiler in the beta channel. label Dec 27, 2022
@Mark-Simulacrum Mark-Simulacrum added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants