Skip to content

Commit 3fe66ed

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 841de0d + 4617e09 commit 3fe66ed

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

config.mak.uname

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,11 @@ ifeq ($(uname_S),Windows)
439439
ifeq (MINGW32,$(MSYSTEM))
440440
prefix = /mingw32
441441
else
442-
prefix = /mingw64
442+
ifeq (CLANGARM64,$(MSYSTEM))
443+
prefix = /clangarm64
444+
else
445+
prefix = /mingw64
446+
endif
443447
endif
444448
# Prepend MSVC 64-bit tool-chain to PATH.
445449
#
@@ -492,7 +496,7 @@ ifeq ($(uname_S),Windows)
492496
NO_POSIX_GOODIES = UnfortunatelyYes
493497
NATIVE_CRLF = YesPlease
494498
DEFAULT_HELP_FORMAT = html
495-
ifeq (/mingw64,$(subst 32,64,$(prefix)))
499+
ifeq (/mingw64,$(subst 32,64,$(subst clangarm,mingw,$(prefix))))
496500
# Move system config into top-level /etc/
497501
ETC_GITCONFIG = ../etc/gitconfig
498502
ETC_GITATTRIBUTES = ../etc/gitattributes
@@ -733,6 +737,10 @@ ifeq ($(uname_S),MINGW)
733737
prefix = /mingw64
734738
HOST_CPU = x86_64
735739
BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup
740+
else ifeq (CLANGARM64,$(MSYSTEM))
741+
prefix = /clangarm64
742+
HOST_CPU = aarch64
743+
BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup
736744
else
737745
COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
738746
BASIC_LDFLAGS += -Wl,--large-address-aware
@@ -749,7 +757,7 @@ ifeq ($(uname_S),MINGW)
749757
USE_LIBPCRE = YesPlease
750758
USE_MIMALLOC = YesPlease
751759
NO_PYTHON =
752-
ifeq (/mingw64,$(subst 32,64,$(prefix)))
760+
ifeq (/mingw64,$(subst 32,64,$(subst clangarm,mingw,$(prefix))))
753761
# Move system config into top-level /etc/
754762
ETC_GITCONFIG = ../etc/gitconfig
755763
ETC_GITATTRIBUTES = ../etc/gitattributes

0 commit comments

Comments
 (0)