From 0efc0f3cc38e8513f73f0e4b820ef49efb45bde1 Mon Sep 17 00:00:00 2001 From: akrm al-hakimi Date: Mon, 22 Sep 2025 09:28:03 -0400 Subject: [PATCH] fix: default to GNU host in Cygwin/MSYS/MinGW environments (#4221) --- rustup-init.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/rustup-init.sh b/rustup-init.sh index 6a50beacb5..65f7a352e3 100755 --- a/rustup-init.sh +++ b/rustup-init.sh @@ -568,6 +568,20 @@ get_architecture() { _arch="${_cputype}-${_ostype}" + case "$_ostype" in + pc-windows-*) + case "$_arch" in + *-pc-windows-msvc) + # User specifically wants MSVC, keep it + ;; + *) + # Default to GNU for Windows + _arch="${_cputype}-pc-windows-gnu" + ;; + esac + ;; + esac + RETVAL="$_arch" }