Add avr-none triple support#3950
Merged
UebelAndre merged 1 commit intobazelbuild:mainfrom Apr 7, 2026
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem: The
triple()parser inrust/platform/triple.bzlfails onavr-nonebecause it only has two components separated by-, which does not match the expectedarch-vendor-system[-abi]format. The function hits thefail()guard at the bottom that requires at least 3 components.Solution: Add a special case for
avr-nonealongside the existing ones forwasm32v1-noneand the ARM Thumb targets.Additional context:
avr-noneis 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 toavr-nonewill fail during toolchain resolution.