Can I build wimlib with Clang (Windows)?

Comments, questions, bug reports, etc.
Post Reply
xhw
Posts: 8
Joined: Sat Feb 25, 2023 3:52 am

Can I build wimlib with Clang (Windows)?

Post by xhw »

The Clang also have full arm64 support, and it can be easily setup via MSYS2 without changing the configure script.
synchronicity
Site Admin
Posts: 472
Joined: Sun Aug 02, 2015 10:31 pm

Re: Can I build wimlib with Clang (Windows)?

Post by synchronicity »

It's not something I've tried before. Traditionally MinGW was the only option, it seems this is new in the last 5 years or so. You're certainly welcome to try and report your results.
xhw
Posts: 8
Joined: Sat Feb 25, 2023 3:52 am

Re: Can I build wimlib with Clang (Windows)?

Post by xhw »

I have tried to build it, and it works well on MSYS2 environment. You don't need to change any code to support it.
You can consider using it to create ARM64 binaries.
synchronicity
Site Admin
Posts: 472
Joined: Sun Aug 02, 2015 10:31 pm

Re: Can I build wimlib with Clang (Windows)?

Post by synchronicity »

Thanks. I've now made a number of improvements:
  • Eliminated the dependencies on libxml2 and winpthreads, so wimlib is now easier to build for Windows.
  • Added dllexport to the declarations in wimlib.h to avoid warnings when building for Windows with clang.
  • Updated README.WINDOWS to show how to use MSYS2 (with the MINGW64, CLANG64, MINGW32, CLANG32, or CLANGARM64 environment). This replaces the previous instructions that used Cygwin and only had mingw64 and mingw32.
  • Improved the tools/make-windows-release script.
That being said, I haven't yet actually tested CLANGARM64. It seems that build can only be done on a Windows ARM64 system.
synchronicity
Site Admin
Posts: 472
Joined: Sun Aug 02, 2015 10:31 pm

Re: Can I build wimlib with Clang (Windows)?

Post by synchronicity »

ARM64 builds are now supported (but not yet actually tested!) using a prebuilt toolchain --- see viewtopic.php?p=1489#p1489.
Post Reply