Skip to content

Commit aa011f1

Browse files
dschoGit for Windows Build Agent
authored andcommitted
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 d516e8c + b9d7de6 commit aa011f1

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CLANG build ARM64
2+
3+
on:
4+
workflow_dispatch:
5+
6+
defaults:
7+
run:
8+
shell: bash
9+
10+
jobs:
11+
clang-build:
12+
runs-on: [Windows, ARM64]
13+
env:
14+
NO_PERL: 1
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: git-for-windows/setup-git-for-windows-sdk@v1
18+
with:
19+
flavor: makepkg-git
20+
architecture: aarch64
21+
# This assumes that the job is running on a self-hosted runner,
22+
# in which case we need to cleanup SDK files.
23+
cleanup: true
24+
- name: Build Git CLANGARM64
25+
run: make -j`nproc`

config.mak.uname

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,10 @@ else
720720
prefix = /mingw64
721721
HOST_CPU = x86_64
722722
BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup
723+
else ifeq (CLANGARM64,$(MSYSTEM))
724+
prefix = /clangarm64
725+
HOST_CPU = aarch64
726+
BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup
723727
else
724728
COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
725729
BASIC_LDFLAGS += -Wl,--large-address-aware

0 commit comments

Comments
 (0)