Skip to content

Commit 100dceb

Browse files
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 8348939 + c660bac commit 100dceb

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

config.mak.uname

Lines changed: 12 additions & 5 deletions
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
@@ -721,11 +725,14 @@ ifeq ($(uname_S),MINGW)
721725
prefix = /mingw32
722726
HOST_CPU = i686
723727
BASIC_LDFLAGS += -Wl,--pic-executable,-e,_mainCRTStartup
724-
endif
725-
ifeq (MINGW64,$(MSYSTEM))
728+
else ifeq (MINGW64,$(MSYSTEM))
726729
prefix = /mingw64
727730
HOST_CPU = x86_64
728731
BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup
732+
else ifeq (CLANGARM64,$(MSYSTEM))
733+
prefix = /clangarm64
734+
HOST_CPU = aarch64
735+
BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup
729736
else
730737
COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
731738
BASIC_LDFLAGS += -Wl,--large-address-aware
@@ -742,7 +749,7 @@ ifeq ($(uname_S),MINGW)
742749
USE_LIBPCRE = YesPlease
743750
USE_MIMALLOC = YesPlease
744751
NO_PYTHON =
745-
ifeq (/mingw64,$(subst 32,64,$(prefix)))
752+
ifeq (/mingw64,$(subst 32,64,$(subst clangarm,mingw,$(prefix))))
746753
# Move system config into top-level /etc/
747754
ETC_GITCONFIG = ../etc/gitconfig
748755
ETC_GITATTRIBUTES = ../etc/gitattributes

0 commit comments

Comments
 (0)