-
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
Create a generic AVR target: avr-unknown-unknown #131651
base: master
Are you sure you want to change the base?
Conversation
rustbot has assigned @compiler-errors. Use |
Some changes occurred in src/doc/rustc/src/platform-support cc @Noratrieb Some changes occurred in src/tools/compiletest cc @jieyouxu These commits modify compiler targets. |
cc @workingjubilee? |
This comment has been minimized.
This comment has been minimized.
bdabb36
to
2639188
Compare
This comment has been minimized.
This comment has been minimized.
2639188
to
dd8e00f
Compare
This comment has been minimized.
This comment has been minimized.
Ouch, I'm not sure why the test is failing - |
my first instinct is "bootstrap problem?" |
I'll take a look |
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.
The test and bootstrap side of things LGTM modulo the compiletest header test thing. Didn't look at the compiler side.
dd8e00f
to
1c8fe66
Compare
This comment has been minimized.
This comment has been minimized.
1c8fe66
to
dcea80a
Compare
This comment has been minimized.
This comment has been minimized.
Just checking since I don't see it linked, did this get an MCP? That is usually the approval step for changing targets. (if not, issue template here https://github.com/rust-lang/compiler-team/issues) |
I haven't created MCP, wasn't sure on the process (especially considering AVR is a rather unpopular target). If you think this needs a MCP, I can create one. |
I think an MCP makes sense just to make everyone aware of the change, it's the usual process even for tier 3 targets. I don't see it actually being a problem, this makes sense to me. Overall I think PR looks pretty good, left a few small comments. Thanks for the thorough build and test instructions, that is awesome to have. |
dcea80a
to
428f415
Compare
Okie, I'll create an MCP then 🙂 |
This comment has been minimized.
This comment has been minimized.
This commit removes the `avr-unknown-gnu-atmega328` target and replaces it with a more generic `avr-unknown-unknown` variant that can be specialized using `-C target-cpu` (e.g. `-C target-cpu=atmega328p`). I've decided to go with the `-unknown` tag (i.e. `avr-unknown-unknown` instead of `avr-unknown-gnu`), because that's the name LLVM already uses - I see no reason to diverge here. Seizing the day, I'm adding myself as the maintainer of this target - I've been already fixing the bugs anyway, might as well make it official. Related discussion: rust-lang#131171
428f415
to
f8643b8
Compare
^ MCP created: rust-lang/compiler-team#800. |
cc @tgross35? 👀 |
So, Rust's naming scheme isn't really consistent, but I think the target should be named There is also precedent for omitting the Otherwise highly in favour! Also, could you edit the main description to also note that you're removing the old target (just to make it clear)? |
|
||
## Target maintainers | ||
|
||
-[Patryk Wychowaniec](https://github.com/Patryk27) <[email protected]> |
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.
Nit:
-[Patryk Wychowaniec](https://github.com/Patryk27) <[email protected]> | |
- [Patryk Wychowaniec](https://github.com/Patryk27) <[email protected]> |
This target is only cross-compiled; x86\_64 Linux, x86\_64 MacOS and aarch64 | ||
MacOS hosts are confirmed to work, but in principle any machine able to run |
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.
Nit:
This target is only cross-compiled; x86\_64 Linux, x86\_64 MacOS and aarch64 | |
MacOS hosts are confirmed to work, but in principle any machine able to run | |
This target is only cross-compiled; x86\_64 Linux, x86\_64 macOS and Aarch64 | |
macOS hosts are confirmed to work, but in principle any machine able to run |
Somebody needs to second the MCP. The changes make sense to me but I don't know enough about it to make a decision here - I'll poke on Zulip. |
☔ The latest upstream changes (presumably #132497) made this pull request unmergeable. Please resolve the merge conflicts. |
This commit removes the
avr-unknown-gnu-atmega328
target and replaces it with a more genericavr-unknown-unknown
variant that can be specialized using-C target-cpu
(e.g.-C target-cpu=atmega328p
).I've decided to go with the
-unknown
tag (i.e.avr-unknown-unknown
instead ofavr-unknown-gnu
), because that's the name LLVM already uses - I see no reason to diverge here.Seizing the day, I'm adding myself as the maintainer of this target - I've been already fixing the bugs anyway, might as well make it official 🙂
Related discussion: #131171.