From 2944629b8ffc774dd1a2283f013c69d077faec12 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 25 Feb 2025 10:17:12 +0000 Subject: [PATCH 1/2] msvc: do handle builds on Windows/ARM64 Git for Windows/ARM64 settled on using `clang` to compile `git.exe`, and hence needs to run in a system where `MSYSTEM` is set to `CLANGARM64` and the prefix to use is `/clangarm64`. We already did that in the `MINGW` arm, i.e. for regular Git for Windows builds using MINGW GCC (or `clang`'s shim pretending to be GCC), now it is time to do the same in the MS Visual C part. Signed-off-by: Johannes Schindelin --- config.mak.uname | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config.mak.uname b/config.mak.uname index eeb3ed20532add..0e07f5dab044c7 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -432,7 +432,11 @@ ifeq ($(uname_S),Windows) ifeq (MINGW32,$(MSYSTEM)) prefix = /mingw32 else - prefix = /mingw64 + ifeq (CLANGARM64,$(MSYSTEM)) + prefix = /clangarm64 + else + prefix = /mingw64 + endif endif # Prepend MSVC 64-bit tool-chain to PATH. # From 98a39d2d1be9788cc2b85b67fd2a6eac63e2c047 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 25 Feb 2025 10:21:52 +0000 Subject: [PATCH 2/2] mingw(arm64): do move the `/etc/git*` location In fb5e3378f8 (mingw: move Git for Windows' system config where users expect it, 2021-06-22), I moved the location of Git for Windows' system config and system Git attributes file to the top-level `/etc/` directory (because it is a much more obvious location than, say, `/mingw64/etc/`). The patch relied on a very specific scenario that the newly-supported Windows/ARM64 builds of `git.exe` fails to fall into. So let's broaden the condition a bit, so that Windows/ARM64 builds also use that location (instead of the even more obscure `/clangarm64/etc/` directory). This fixes https://github.com/git-for-windows/git/issues/5431. Signed-off-by: Johannes Schindelin --- config.mak.uname | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.mak.uname b/config.mak.uname index 0e07f5dab044c7..c161ddeeeade94 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -490,7 +490,7 @@ ifeq ($(uname_S),Windows) NATIVE_CRLF = YesPlease DEFAULT_HELP_FORMAT = html SKIP_DASHED_BUILT_INS = YabbaDabbaDoo -ifeq (/mingw64,$(subst 32,64,$(prefix))) +ifeq (/mingw64,$(subst 32,64,$(subst clangarm,mingw,$(prefix)))) # Move system config into top-level /etc/ ETC_GITCONFIG = ../etc/gitconfig ETC_GITATTRIBUTES = ../etc/gitattributes @@ -752,7 +752,7 @@ ifeq ($(uname_S),MINGW) USE_LIBPCRE = YesPlease USE_MIMALLOC = YesPlease NO_PYTHON = - ifeq (/mingw64,$(subst 32,64,$(prefix))) + ifeq (/mingw64,$(subst 32,64,$(subst clangarm,mingw,$(prefix)))) # Move system config into top-level /etc/ ETC_GITCONFIG = ../etc/gitconfig ETC_GITATTRIBUTES = ../etc/gitattributes