Skip to content

Commit 995a166

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 c9fa624 + 3b14f64 commit 995a166

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
@@ -701,6 +701,10 @@ ifeq ($(uname_S),MINGW)
701701
prefix = /mingw64
702702
HOST_CPU = x86_64
703703
BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup
704+
else ifeq (CLANGARM64,$(MSYSTEM))
705+
prefix = /clangarm64
706+
HOST_CPU = aarch64
707+
BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup
704708
else
705709
COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
706710
BASIC_LDFLAGS += -Wl,--large-address-aware

0 commit comments

Comments
 (0)