Skip to content

Commit ac6ae91

Browse files
committed
tools: Update build.sh for avr-none
``` error: target requires explicitly specifying a cpu with `-C target-cpu` ```
1 parent 30e04b1 commit ac6ae91

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/build.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ default_targets=(
2929

3030
# no atomic CAS (16-bit)
3131
avr-unknown-gnu-atmega2560 # custom target
32-
avr-unknown-gnu-atmega328
32+
avr-unknown-gnu-atmega328 # before https://github.com/rust-lang/rust/pull/131651
33+
avr-none # after https://github.com/rust-lang/rust/pull/131651
3334
# no atomic CAS (32-bit)
3435
thumbv4t-none-eabi
3536
thumbv6m-none-eabi
@@ -347,6 +348,10 @@ build() {
347348
# https://github.com/rust-lang/rust/issues/88252
348349
target_rustflags+=" -C opt-level=s"
349350
fi
351+
if [[ "${target}" == "avr-none" ]]; then
352+
# "error: target requires explicitly specifying a cpu with `-C target-cpu`"
353+
target_rustflags+=" -C target-cpu=atmega328p"
354+
fi
350355
;;
351356
amdgcn*)
352357
# "error: target requires explicitly specifying a cpu with `-C target-cpu`"

0 commit comments

Comments
 (0)