Skip to content

Commit f3ccd26

Browse files
committed
fix: default to GNU host in Cygwin/MSYS/MinGW environments (#4221)
1 parent 60d6afb commit f3ccd26

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

rustup-init.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,20 @@ get_architecture() {
568568

569569
_arch="${_cputype}-${_ostype}"
570570

571+
case "$_ostype" in
572+
pc-windows-*)
573+
case "$_arch" in
574+
*-pc-windows-msvc)
575+
# User specifically wants MSVC, keep it
576+
;;
577+
*)
578+
# Default to GNU for Windows
579+
_arch="${_cputype}-pc-windows-gnu"
580+
;;
581+
esac
582+
;;
583+
esac
584+
571585
RETVAL="$_arch"
572586
}
573587

0 commit comments

Comments
 (0)