Re: [PATCH 1/2] rust: pick a GCC-compatible Cargo target under MSYS2/MinGW
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Sep 11, 2026, 12:25 UTC
- Message-ID
- <040027f8-983b-9c12-5498-330129cd8600@gmx.de>
- In-Reply-To
- <xmqqy0dkjhjn.fsf@gitster.g>
Hi Junio,
On Tue, 1 Sep 2026, Junio C Hamano wrote:
Show 19 quoted lines
> "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
> writes:
>
> > + ifneq (,$(filter %ARM64, $(MSYSTEM)))
> > + HOST_CPU = aarch64
> > + else ifneq (,$(filter %32, $(MSYSTEM)))
> > + HOST_CPU = i686
> > + else
> > + HOST_CPU = x86_64
> > + endif
> > + ifneq (,$(filter CLANG%, $(MSYSTEM)))
> > + CARGO_TARGET = $(HOST_CPU)-pc-windows-gnullvm
> > + else
> > + CARGO_TARGET = $(HOST_CPU)-pc-windows-gnu
> > + endif
>
> Assuming HOST_CPU is x86_64 in the above, as UCRT64, unlike
> CLANG{ARM64,64,32}, does not match CLANG%, I presume that the above
> gives "x86_64-pc-windows-gnu" to builds with MSYSTEM set to UCRT64.Correct.
Show 18 quoted lines
> There is this "we only need MINGW64 but the switch to UCRT64 is > imminent, and others are for documentation" part we see in the > [PATCH 2/2] > > + case "$MSYSTEM" in > + CLANGARM64) target=aarch64-pc-windows-gnullvm ;; > + CLANG64) target=x86_64-pc-windows-gnullvm ;; > + CLANG32) target=i686-pc-windows-gnullvm ;; > + UCRT64) target=x86_64-pc-windows-gnullvm ;; > + MINGW64) target=x86_64-pc-windows-gnu ;; > + MINGW32) target=i686-pc-windows-gnu ;; > + *) echo "::error::Unsupported MSYSTEM: $MSYSTEM"; exit 1 ;; > + esac && > + rustup target add "$target" && > > that maps UCRT64 to "x86_64-pc-windows-gnullvm" > > I do not know if it is intended. If so, please ignore.
Since UCRT64 is still using GCC, it should be `-gnu`. Thanks for catching.
Ciao, Johannes