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: |
dscho
left a comment
There was a problem hiding this comment.
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 <7903172+tommyvct@users.noreply.github.com> Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
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: |
dscho
left a comment
There was a problem hiding this comment.
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-wrapperthat supports arm64 on Windows. This way, the regularmingw32packages 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/binto 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.exeis 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-gitC:\git-sdk-64\usr\src\MINGW-packagescd /usr/src/mingw-packages/mingw-w64-gitMINGW_INSTALLS=mingw32 makepkg-mingw -sLfpkg/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
arm64folder and copy the native Git arm64 binaries from the previous step into it: