ARM64 Support

Comments, questions, bug reports, etc.
Site Admin
Posts: 329
Joined: Sun Aug 02, 2015 10:31 pm

Re: ARM64 Support

Post by synchronicity »

Edit: File too large (27 MB at maximum compression). How may I submit the package?
Is there a source code patch to look at? I don't necessarily need the binaries.

Posts: 9
Joined: Wed Jan 31, 2018 2:45 pm

Re: ARM64 Support

Post by joveler »

I succeeded in building libwim-15.dll on MSYS2 with llvm-mingw toolchain.

Even the latest MinGW-w64 toolchain available on MSYS2 does not support aarch64-w64-mingw32 target.
However, LLVM/Clang does support ARM64 Windows target, and MSYS2 community was testing clang toolchain (ref) for it.
Thus I tried my best to compile wimlib with llvm based mingw-w64 toolchain, llvm-mingw.

[Used tools]
- MSYS2: latest update
- llvm-mingw: 20201020 with LLVM stable 11.0.0

[Build Instructions]
I adapted official windows cross compile build script to be used in MSYS2.
I also had to patch sources to make them compilable on LLVM/Clang.

- libxml2: linker detection of had to be patched.
- wimlib: __declspec(dllexport) had to be added to every extern function prototypes of wimlib.h.

Read attached wimlib-llvm-aarch64-manual.7z for details.

Attached as wimlib-1.13.3-bin-aarch64.7z.

LLVM linker could not link wimlib-imagex.exe, so I could obtain only libwim-15.dll.

Code: Select all

CCLD     wimlib-imagex.exe
lld-link: error: undefined symbol: __declspec(dllimport) __winitenv
>>> referenced by C:\Joveler\llvm-mingw\aarch64-w64-mingw32\lib\crt2u.o:(.refptr.__imp___winitenv)
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:1318: wimlib-imagex.exe] Error 1
I have tested the ARM64 dll with my C# wimlib wrapper on Raspberry Pi 4B, and it worked without any issues.

The instruction, patches, and binaries are also available on GitHub repo of ManagedWimLib.
(312.42 KiB) Downloaded 14 times
(8.26 KiB) Downloaded 11 times

Post Reply