-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Implementation of RFC2867 #76260
Implementation of RFC2867 #76260
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
I think at minimum the following targets will also need
Someone who knows about platforms supporting ARMv6 and ARMv7 will have to sort through the rest. (@jonas-schievink?) |
Responded to feedback, also aimed to improve some of the error messages in collect.rs |
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.
Looks pretty good now! Some tests should be added though (and some manual testing is probably useful too)
@jonas-schievink where should I look to for examples of tests in the code base covering similar areas? |
I think for the initial version of this, it's enough to check that the attribute is accepted and rejected correctly. For that, you can write UI tests in |
Oh, I also suggest rebasing this PR to fix the merge conflicts, then CI can run tests for you. |
This comment has been minimized.
This comment has been minimized.
@jonas-schievink So I started working on the tests and after seeing CI fail started running the tests locally. I'm just wondering if there's a way to run them for a different architecture? Otherwise I'll just get the architecture doesn't support |
This comment has been minimized.
This comment has been minimized.
@jonas-schievink I'd like to try and get this sorted by this week if possible but I might need some help with the UI tests to figure out how to get them to just run with the intended architectures.. Also should I add a UI test to just run with intel so I can get the error message for arch doesn't support instruction_set 🤔 (I think yes so I'll probably just start that soon-ish) |
This comment has been minimized.
This comment has been minimized.
src/test/ui/error-codes/E0775.rs
Outdated
@@ -0,0 +1,11 @@ | |||
// only-armv4t-unknown-linux-gnueabi | |||
// only-armv5te-unknown-linux-gnueabi | |||
// only-armv5te-unknown-linux-musleabi |
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.
Are you sure you can stack only
like that?
I recall it did not work and tests like that have been changed to use different conditions.
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.
I have no idea, I couldn't really find any documentation on how the comments worked and figured it was worth trying before writing the mass of ignore-*
I'd need to do to run using just those 3 architectures
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.
Judging by the comment it won't run this test on any target:
rust/src/tools/compiletest/src/header.rs
Line 53 in 6cae281
// we should check if any only-<platform> exists and if it exists |
So I guess I need to add |
I don't know how to solve it and have very limited search ability on the mobile. |
@mati865 okay thanks for the pointer though, I'll try the ignores at some point later, just trying to get the CI to the point of running those tests first 😬 |
@@ -0,0 +1,35 @@ | |||
// ignore-aarch64 |
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.
@jonas-schievink @mati865 I don't know if either of you have time to have a look at this. But I can't figure out all the ignores I need to stop this running on architectures other than the arm v4 and v5 targets
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.
It should be fine to just run it on one of the Arm architectures
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.
Oh that would make things easier, I was trying to test on all relevant arm targets
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
You can make this take less time with |
yeah I tried doing filtering on them like with cargo test but that didn't seem to work. It wasn't so bad when it failed early on 😅. So the current error_code doctest issue is to do with the architecture it's ran on not supporting arm:a32 or arm::t32. I'll add a cfg_attr to it so it works. But do you want it to encompass all the targets it works on, or just pick one of them? And also should I mention which targets do support it or just leave that off because it's discoverable elsewhere i.e. the tracking issue? |
I'm not the person to ask, but #76260 (comment) sounds like only one target is fine.
This seems like the list could grow a lot over time - maybe point to the tracking issue instead? |
@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author |
@jonas-schievink all the feedback should be addressed now 👍 |
Awesome! Will approve once CI passes |
@xd009642 do you mind squashing the commit history a little? 52 commits is a lot 😅 |
There are instructions at https://rustc-dev-guide.rust-lang.org/git.html#rebasing |
Yeah I can do that tomorrow morning 👍 |
gazes longingly at rust-lang/triagebot#821 |
@jonas-schievink @jyn514 squashed and I fixed the mistake in the stderr post case fix. Just couldn't wait until tomorrow 😄 |
@bors r=jonas-schievink |
📌 Commit bdb3f77 has been approved by |
☀️ Test successful - checks-actions, checks-azure |
#74727
So I've started work on this, I think my next steps are to make use of the
instruction_set
value in the llvm codegen but this is the point where I begin to get a bit lost. I'm looking at the code but it would be nice to have some guidance on what I've currently done and what I'm doing next 😄