Skip to content

Add avr-none triple support#3950

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

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

Conversation

@stefanbucur
Copy link
Copy Markdown
Contributor

@stefanbucur stefanbucur commented Apr 7, 2026

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.
Copy link
Copy Markdown
Collaborator

@UebelAndre UebelAndre left a comment

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