Commit 5bad824
authored
Add avr-none triple support (bazelbuild#3950)
**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.1 parent 2bad175 commit 5bad824
2 files changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
43 | 51 | | |
44 | 52 | | |
45 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
147 | 150 | | |
148 | 151 | | |
149 | 152 | | |
| |||
0 commit comments