-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add arm64 support to git-wrapper #44
Conversation
86a29c6
to
4d36b19
Compare
@dscho it works with It actually works on Windows 8.1 as well, so I assume that the logic I got from here is enough to dynamically load I just had to manually copy the DLLs for the generated native ARM64 binaries. Created a separate issue for that: git-for-windows/git#2970 I double-checked and both the Windows 10 ARM64: Windows 8.1 VM x64: |
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.
Thank you so much for working on this!
I suggested a couple changes, nothing big, should be pretty close to being done now. Oh, and one more suggestion: could you squash your commits into a single one?
In order to support native Git for Windows ARM64 binaries, this commit introduces ARM64 runtime detection. Git-wrapper itself will remain an i686 or x86_64 executable for now, but since Windows on ARM has built-in i686 emulation, it can run the file. If an ARM64 system is detected, we set MSYSTEM=ARM64. Next to that, because many binaries like curl aren't available natively for ARM64 yet, we add /mingw32/bin to the path, so that we'll fallback to i686 executables in that case. Signed-off-by: Tommy Vercetti <[email protected]> Signed-off-by: Dennis Ameling <[email protected]>
be37999
to
ed2aad9
Compare
@dscho just implemented the feedback and squashed everything into a single commit 🚀 Can confirm things still work on my ARM64 device as well as in my Windows 8.1 VM (which of course doesn't have UPDATE here's a screenshot from ARM64, all looks good as far as I can see: |
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.
From your comments, I gather that you tested this, and since everything looks pretty and neat, I will merge it. Thank you so much!
@dennisameling I got a report that the 32-bit version of Git for Windows v2.30.1 is completely broken on ARM64 (fork bomb). Could you verify that? I suspect that this PR is responsible for that issue. |
Here is my attempt to help: #46. But I cannot test (I don't have access to any Windows/ARM64 system). |
CC @dscho
Builds further on #43
Some of the logic in this PR comes from https://www.rudyhuyn.com/blog/2017/12/13/how-to-detect-that-your-x86-application-runs-on-windows-on-arm/
This PR allows users to build mingw32 but with a special
git-wrapper
that supports arm64 on Windows. This way, the regularmingw32
packages can be used, while Git itself (e.g.git clone
) runs natively on arm64.MSYSTEM is set correctly to ARM64, and after manually adding
/arm64/bin
to the PATH (should be done automatically when git-for-windows/git-sdk-32#6 is merged), the native Git executable is used as well:Here you can see that the wrapper
git.exe
is still 32-bit, but the actual git commands are handled by the native ARM64 binary:The folder structure is as follows in that case:
Build steps for
mingw-w64-i686-git
C:\git-sdk-64\usr\src\MINGW-packages
cd /usr/src/mingw-packages/mingw-w64-git
MINGW_INSTALLS=mingw32 makepkg-mingw -sLf
pkg/mingw-w64-i686-git
, you'll find the generated binaries hereBuild steps for native Git arm64 binaries
Follow the steps mentioned here: git-for-windows/git#2915 (comment)
Putting everything together on the arm64 device
arm64
folder and copy the native Git arm64 binaries from the previous step into it: