-
Notifications
You must be signed in to change notification settings - Fork 19
Add ARM64/aarch64 support #397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but should we not ask pacman
to install clang
in that aarch64
case, too, at least as long as msys=false
?
0187206
to
8bbc989
Compare
bce7786
to
2737d10
Compare
I previously did that part in my git-for-windows/git PR, but I agree it makes sense to do it in this GH Action instead. Have just set that up, as well as some cleanup logic to fix #398.
|
It is really nice that these VMs are decently fast. Do you have an ARM (pun intended?) template to set up a new Azure VM that acts as a GitHub Actions build agent? |
6478010
to
88fd47f
Compare
Haha, that abbreviation is very confusing indeed. I used a VM with 8 cores, but there's VMs with up to 64 cores if you need even more performance. I installed the x64 version of Git for Windows on the machine, so once we have a first native ARM64 version in place, the clone/preparation step will most likely be quite a bit faster. Good call regarding the ARM template. I just created one. Took some effort to get it right, but it works now! It comes with a post-deployment script that:
Here's a fresh run (8m25s) with the latest changes from this PR, ran on a VM that I deployed using the ARM template above 🚀 https://github.com/dennisameling/git/actions/runs/3077779847/jobs/4972879838 Think we're good to go now with this PR, right? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last concern, as the test run shows that the post
action does add a full minute...
88fd47f
to
7ac9460
Compare
I just went ahead and moved the cleanup logic into a completely separate PR to make things easier to review. Another successful run of just the ARM64 logic: https://github.com/dennisameling/git/actions/runs/3117529361/jobs/5056244750 |
7ac9460
to
3497754
Compare
3497754
to
ad66c9d
Compare
0781689
to
ef3a752
Compare
main.ts
Outdated
// Some binaries aren't available yet in the /clangarm64/bin folder, but Windows 11 ARM64 | ||
// has support for x64 emulation, so let's add /mingw64/bin as a fallback. | ||
...(msystem === 'CLANGARM64' ? ['/mingw64/bin'] : []), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was specifically missing git.exe
and friends. This fallback will no longer be needed once a first version of Git for Windows ARM64 has been released and this binary becomes available in the /clangarm64
folder (assuming that ARM64 will get its own SDK at some point)
ef3a752
to
a4ceb1b
Compare
@dennisameling I adjusted this PR branch a bit, could you have a look (and verify that it still works as intended)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates and for adding the commit description! Just left one minor comment/question. This basic test is working fine, thank you 👍🏼
main.ts
Outdated
if (architecture === 'aarch64') { | ||
// Some binaries aren't available yet in the /clangarm64/bin folder, but Windows 11 ARM64 | ||
// has support for x64 emulation, so let's add /mingw64/bin as a fallback. | ||
binPaths.splice(binPaths.length - 2, 0, '/mingw64/bin') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This results in the following array:
[ '/usr/bin/core_perl', '/mingw64/bin', '/usr/bin', '/clangarm64/bin' ]
... which will eventually end up in the path as follows:
/clangarm64/bin:/usr/bin:/mingw64/bin:/usr/bin/core_perl:${PATH}
Is it intended to put /usr/bin
before /mingw64/bin
in this case? I always thought it's preferred to put /mingw64/bin
first and fallback to /usr/bin
only if really needed, but I lack any clear background info/reasoning on that. No strong preference on my side for this one - just curious!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh no, this is an off-by-one... 😱
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dennisameling could I bother you to test again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dscho thanks! I also tested with makepkg-git
instead of full
this time, and with cleanup: true
. Everything is working as expected 🎉 https://github.com/dennisameling/git/actions/runs/3159629157/jobs/5143099298
a4ceb1b
to
97cefe9
Compare
This does not install the Git for Windows/ARM64 SDK, of course, because such a thing does not exist. However, it _does_ install the Git for Windows SDK targeting x86_64 (which Windows/ARM64 11 can use) and then adds MINGW versions of `clang` targeting aarch64. Signed-off-by: Dennis Ameling <dennis@dennisameling.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dennisameling thank you so much for your tireless work. This is now live, as v1.5.0. |
Leverages the x64 Git for Windows SDK but sets MSYSTEM to
CLANGARM64
which is needed to use the native ARM64clang
compiler.Used in git-for-windows/git#3916 - successful CI run: https://github.com/dennisameling/git/actions/runs/3073573453/jobs/4965793895