Skip to content

Commit

Permalink
Build more targets on 1.59
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Jul 23, 2022
1 parent 2d77242 commit 8a6daef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ jobs:
fail-fast: false
matrix:
include:
- rust: '1.59'
- rust: stable
- rust: beta
- rust: nightly
Expand Down
12 changes: 11 additions & 1 deletion tools/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ if [[ "${rustc_version}" == *"nightly"* ]] || [[ "${rustc_version}" == *"dev"* ]
;;
esac
fi
has_asm=''
case "${rustc_version}" in
# asm requires 1.59
1.[0-4]* | 1.5[0-8].*)
if [[ -n "${nightly}" ]]; then
has_asm='1'
fi
;;
*) has_asm='1' ;;
esac
echo "base rustflags='${RUSTFLAGS:-} ${check_cfg:-}'"

x() {
Expand Down Expand Up @@ -150,7 +160,7 @@ build() {
*-none* | avr-* | riscv32imc-esp-espidf)
args+=(--exclude-features "std")
cfgs=$(RUSTC_BOOTSTRAP=1 rustc ${pre_args[@]+"${pre_args[@]}"} --print cfg --target "${target}")
if ! grep <<<"${cfgs}" -q "target_has_atomic="; then
if ! grep <<<"${cfgs}" -q "target_has_atomic=" && [[ -n "${has_asm}" ]]; then
case "${target}" in
bpf* | thumbv4t-*) ;; # TODO
*)
Expand Down

0 comments on commit 8a6daef

Please sign in to comment.