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

Create a generic AVR target: avr-none #131651

Merged
merged 2 commits into from
Feb 21, 2025
Merged

Conversation

Patryk27
Copy link
Contributor

@Patryk27 Patryk27 commented Oct 13, 2024

This commit removes the avr-unknown-gnu-atmega328 target and replaces it with a more generic avr-none variant that must be specialized using -C target-cpu (e.g. -C target-cpu=atmega328p).

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 discussions:

try-job: x86_64-gnu-debug

@rustbot
Copy link
Collaborator

rustbot commented Oct 13, 2024

r? @compiler-errors

rustbot has assigned @compiler-errors.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 13, 2024
@rustbot
Copy link
Collaborator

rustbot commented Oct 13, 2024

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.
(See the Target Tier Policy.)

@Patryk27
Copy link
Contributor Author

cc @workingjubilee?

@rust-log-analyzer

This comment has been minimized.

@Patryk27 Patryk27 force-pushed the avr-unknown-unknown branch from bdabb36 to 2639188 Compare October 13, 2024 13:25
@rust-log-analyzer

This comment has been minimized.

@Patryk27 Patryk27 force-pushed the avr-unknown-unknown branch from 2639188 to dd8e00f Compare October 13, 2024 13:36
@rust-log-analyzer

This comment has been minimized.

@Patryk27
Copy link
Contributor Author

Ouch, I'm not sure why the test is failing - rustc --print=all-target-specs-json -Z unstable-options does return avr-unknown-unknown.

@workingjubilee
Copy link
Member

my first instinct is "bootstrap problem?"

@workingjubilee workingjubilee added the O-AVR Target: AVR processors (ATtiny, ATmega, etc.) label Oct 13, 2024
@jieyouxu
Copy link
Member

I'll take a look

@jieyouxu jieyouxu added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 13, 2024
Copy link
Member

@jieyouxu jieyouxu left a 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.

@rust-log-analyzer

This comment has been minimized.

@Patryk27 Patryk27 force-pushed the avr-unknown-unknown branch from 1c8fe66 to dcea80a Compare October 19, 2024 12:54
@rustbot rustbot added the A-compiletest Area: The compiletest test runner label Oct 19, 2024
@rust-log-analyzer

This comment has been minimized.

@tgross35
Copy link
Contributor

Thanks for the updates, the new implementation looks very clean. Added a try job that I believe runs rmake tests, I think this looks good as long as that passes.

@bors try

@bors
Copy link
Contributor

bors commented Feb 19, 2025

⌛ Trying commit 78ddabf with merge cbf7965...

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 19, 2025
Create a generic AVR target: avr-none

This commit removes the `avr-unknown-gnu-atmega328` target and replaces it with a more generic `avr-none` variant that must be specialized using `-C target-cpu` (e.g. `-C target-cpu=atmega328p`).

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 discussions:
- rust-lang#131171
- rust-lang/compiler-team#800

try-job: x86_64-gnu-debug
@tgross35
Copy link
Contributor

(it's cheating a bit, but should be good for the time being)

Do you just mean using avr as the target CPU?

@Patryk27
Copy link
Contributor Author

Patryk27 commented Feb 19, 2025

Yeah, that's the cheating part - I couldn't force lld to understand -mmcu / -mcpu / --mmcu / --mcpu, so instead I've adjusted the test's target-cpu to the "minimal" variant (of just the base instruction set) that seems to be lld's default. I'm open to other approaches, just couldn't make it work otherwise myself.

@tgross35
Copy link
Contributor

That seems fine to me for the time being. Mind just adding a comment about that in the rmake test?

@bors
Copy link
Contributor

bors commented Feb 19, 2025

☀️ Try build successful - checks-actions
Build commit: cbf7965 (cbf796516b8283f9824489185badd8a0e2359030)

@Patryk27
Copy link
Contributor Author

Ready!

@tgross35
Copy link
Contributor

Thanks! Let's get this in.

@bors r+

@bors
Copy link
Contributor

bors commented Feb 20, 2025

📌 Commit d5128f9 has been approved by tgross35

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 20, 2025
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Feb 20, 2025
…ross35

Create a generic AVR target: avr-none

This commit removes the `avr-unknown-gnu-atmega328` target and replaces it with a more generic `avr-none` variant that must be specialized using `-C target-cpu` (e.g. `-C target-cpu=atmega328p`).

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 discussions:
- rust-lang#131171
- rust-lang/compiler-team#800

try-job: x86_64-gnu-debug
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 20, 2025
…kingjubilee

Rollup of 14 pull requests

Successful merges:

 - rust-lang#131651 (Create a generic AVR target: avr-none)
 - rust-lang#136473 (infer linker flavor by linker name if it's sufficiently specific)
 - rust-lang#136608 (Pass through of target features to llvm-bitcode-linker and handling them)
 - rust-lang#136985 (Do not ignore uninhabited types for function-call ABI purposes. (Remove BackendRepr::Uninhabited))
 - rust-lang#137192 (Remove obsolete Windows ThinLTO+TLS workaround)
 - rust-lang#137204 (Clarify MIR dialects and phases)
 - rust-lang#137270 (Fix `*-win7-windows-msvc` target since 26eeac1)
 - rust-lang#137298 (Check signature WF when lowering MIR body)
 - rust-lang#137299 (Simplify `Postorder` customization.)
 - rust-lang#137312 (Update references to cc_detect.rs)
 - rust-lang#137313 (Some codegen_llvm cleanups)
 - rust-lang#137318 (Workaround Cranelift not yet properly supporting vectors smaller than 128bit)
 - rust-lang#137322 (Update docs for default features of wasm targets)
 - rust-lang#137324 (Make x86 QNX target name consistent with other Rust targets)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 21, 2025
…kingjubilee

Rollup of 12 pull requests

Successful merges:

 - rust-lang#131651 (Create a generic AVR target: avr-none)
 - rust-lang#134340 (Stabilize `num_midpoint_signed` feature)
 - rust-lang#136473 (infer linker flavor by linker name if it's sufficiently specific)
 - rust-lang#136608 (Pass through of target features to llvm-bitcode-linker and handling them)
 - rust-lang#136985 (Do not ignore uninhabited types for function-call ABI purposes. (Remove BackendRepr::Uninhabited))
 - rust-lang#137270 (Fix `*-win7-windows-msvc` target since 26eeac1)
 - rust-lang#137312 (Update references to cc_detect.rs)
 - rust-lang#137318 (Workaround Cranelift not yet properly supporting vectors smaller than 128bit)
 - rust-lang#137322 (Update docs for default features of wasm targets)
 - rust-lang#137324 (Make x86 QNX target name consistent with other Rust targets)
 - rust-lang#137338 (skip submodule updating logics on tarballs)
 - rust-lang#137340 (Add a notice about missing GCC sources into source tarballs)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9de94b4 into rust-lang:master Feb 21, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Feb 21, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 21, 2025
Rollup merge of rust-lang#131651 - Patryk27:avr-unknown-unknown, r=tgross35

Create a generic AVR target: avr-none

This commit removes the `avr-unknown-gnu-atmega328` target and replaces it with a more generic `avr-none` variant that must be specialized using `-C target-cpu` (e.g. `-C target-cpu=atmega328p`).

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 discussions:
- rust-lang#131171
- rust-lang/compiler-team#800

try-job: x86_64-gnu-debug
djdisodo added a commit to djdisodo/embassy that referenced this pull request Feb 21, 2025
djdisodo added a commit to djdisodo/embassy that referenced this pull request Feb 21, 2025
@tgross35 tgross35 assigned tgross35 and unassigned compiler-errors Feb 21, 2025
@Patryk27 Patryk27 deleted the avr-unknown-unknown branch February 23, 2025 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc O-AVR Target: AVR processors (ATtiny, ATmega, etc.) 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-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants