Skip to content

Add avr-none triple support - #3950

Merged
UebelAndre merged 1 commit into
bazelbuild:mainfrom
stefanbucur:add-avr-none-triple
Apr 7, 2026
Merged

Add avr-none triple support#3950
UebelAndre merged 1 commit into
bazelbuild:mainfrom
stefanbucur:add-avr-none-triple

Conversation

@stefanbucur

@stefanbucur stefanbucur commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Problem: The triple() parser in rust/platform/triple.bzl fails on avr-none because it only has two components separated by -, which does not match the expected arch-vendor-system[-abi] format. The function hits the fail() guard at the bottom that requires at least 3 components.

Solution: Add a special case for avr-none alongside the existing ones for wasm32v1-none and the ARM Thumb targets.

Additional context: avr-none is the standard Rust target triple for AVR bare-metal targets (ATtiny, ATmega, AVR-DA series, etc.). Without this fix, any project using rules_rust with an AVR toolchain (even a custom one) that sets the target triple to avr-none will fail during toolchain resolution.

The avr-none triple is a two-component bare-metal target used for AVR
microcontrollers (e.g. ATtiny10, AVR128DB28). Like wasm32v1-none and
the ARM Thumb targets, it does not fit the standard three-component
arch-vendor-system format, so it needs a dedicated special case.

@UebelAndre UebelAndre left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@UebelAndre
UebelAndre enabled auto-merge April 7, 2026 13:17
@UebelAndre
UebelAndre added this pull request to the merge queue Apr 7, 2026
Merged via the queue into bazelbuild:main with commit 5bad824 Apr 7, 2026
3 checks passed
stefanbucur added a commit to stefanbucur/toolchains_avr that referenced this pull request Jun 19, 2026
rules_rust 0.70.0 (released 2026-04-22) includes the avr-none triple
support from bazelbuild/rules_rust#3950, so the version pin is now
sufficient and no git_override is needed.

All Rust targets updated to edition 2024.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants