Skip to content

Commit

Permalink
Tweak target triple handling
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Aug 13, 2023
1 parent d50fdcb commit db86a25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ EOF
case "${runner}" in
'')
case "${target}" in
# On x86, qemu-user is not used by default.
# On x86 with SSE2, qemu-user is not used by default.
x86_64* | i686-*) ;;
*) use_qemu='1' ;;
esac
Expand Down Expand Up @@ -573,10 +573,7 @@ EOF
case "${target}" in
aarch64* | arm64*)
qemu_arch="${target%%-*}"
case "${target}" in
arm64*be*) qemu_arch=aarch64_be ;;
arm64*) qemu_arch=aarch64 ;;
esac
qemu_arch="${qemu_arch/arm64/aarch64}"
case "${qemu_version}" in
7.* | 8.0) default_qemu_cpu=a64fx ;; # ARMv8.2-a + SVE
*) default_qemu_cpu=neoverse-v1 ;; # ARMv8.4-a + SVE + more features (https://developer.arm.com/Processors/Neoverse%20V1)
Expand All @@ -588,7 +585,7 @@ EOF
*) qemu_arch=arm ;;
esac
;;
i*86-*) qemu_arch=i386 ;;
i?86-*) qemu_arch=i386 ;;
hexagon-*) qemu_arch=hexagon ;;
loongarch64-*) qemu_arch=loongarch64 ;;
m68k-*) qemu_arch=m68k ;;
Expand Down Expand Up @@ -625,7 +622,7 @@ EOF
riscv64*) qemu_arch=riscv64 ;;
s390x-*) qemu_arch=s390x ;;
sparc-*) qemu_arch=sparc32plus ;;
sparc64-*) qemu_arch=sparc64 ;;
sparc64-* | sparcv9-*) qemu_arch=sparc64 ;;
x86_64*)
qemu_arch=x86_64
# qemu does not seem to support emulating x86_64 CPU features on x86_64 hosts.
Expand Down
2 changes: 1 addition & 1 deletion tools/ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ case "${target}" in
# With dynamic linking (default for mips{,el}-unknown-linux-musl/mips64-openwrt-linux-musl)
case "${target}" in
# TODO: No such file or directory
i586-* | i686-* | x86_64*) ;;
i?86-* | x86_64*) ;;
*)
export RUSTFLAGS="${base_rustflags} -C target-feature=-crt-static"
run_tests
Expand Down

0 comments on commit db86a25

Please sign in to comment.