Skip to content

Commit 3cf7696

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
Add support for CLANGARM64 target (#3916)
**This requires an ARM64-machine with Windows 11 installed (which supports x64 emulation for MSYS2)** ### The main idea - Use the main MSYS2/git-sdk-64 setup, which works on Windows 11 on ARM thanks to x64-emulation - Configure the official `clangarm64` MSYS2 repo - Install `mingw-w64-clang-aarch64-toolchain` which contains the ARM64-native Clang compiler
2 parents e8dad5a + e79b54f commit 3cf7696

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

config.mak.uname

+11-3
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,11 @@ ifeq ($(uname_S),Windows)
432432
ifeq (MINGW32,$(MSYSTEM))
433433
prefix = /mingw32
434434
else
435-
prefix = /mingw64
435+
ifeq (CLANGARM64,$(MSYSTEM))
436+
prefix = /clangarm64
437+
else
438+
prefix = /mingw64
439+
endif
436440
endif
437441
# Prepend MSVC 64-bit tool-chain to PATH.
438442
#
@@ -485,7 +489,7 @@ ifeq ($(uname_S),Windows)
485489
NO_POSIX_GOODIES = UnfortunatelyYes
486490
NATIVE_CRLF = YesPlease
487491
DEFAULT_HELP_FORMAT = html
488-
ifeq (/mingw64,$(subst 32,64,$(prefix)))
492+
ifeq (/mingw64,$(subst 32,64,$(subst clangarm,mingw,$(prefix))))
489493
# Move system config into top-level /etc/
490494
ETC_GITCONFIG = ../etc/gitconfig
491495
ETC_GITATTRIBUTES = ../etc/gitattributes
@@ -726,6 +730,10 @@ ifeq ($(uname_S),MINGW)
726730
prefix = /mingw64
727731
HOST_CPU = x86_64
728732
BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup
733+
else ifeq (CLANGARM64,$(MSYSTEM))
734+
prefix = /clangarm64
735+
HOST_CPU = aarch64
736+
BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup
729737
else
730738
COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
731739
BASIC_LDFLAGS += -Wl,--large-address-aware
@@ -742,7 +750,7 @@ ifeq ($(uname_S),MINGW)
742750
USE_LIBPCRE = YesPlease
743751
USE_MIMALLOC = YesPlease
744752
NO_PYTHON =
745-
ifeq (/mingw64,$(subst 32,64,$(prefix)))
753+
ifeq (/mingw64,$(subst 32,64,$(subst clangarm,mingw,$(prefix))))
746754
# Move system config into top-level /etc/
747755
ETC_GITCONFIG = ../etc/gitconfig
748756
ETC_GITATTRIBUTES = ../etc/gitattributes

0 commit comments

Comments
 (0)