This PR adds support for building librsvg for the llvm-mingw ARM/ARM64 targets by compiling the nightly version of Rust and using the build-std feature to compile the standard library itself. This approach makes us independent of the prebuilt binaries provided by Rust and allows us to safely use UCRT as default CRT library (instead than MSVCRT).
A small amount of patches against Rust makes this possible, some of them are incompatible with the GCC targets that Rust provides. For example, it removes the need of linking against libgcc, libgcc_eh and libgcc_s and it forces the entry point to DllMainCRTStartup (or _DllMainCRTStartup for i686) located in MinGW. This works for our use-case, but might break when building Rust executables our using LLD in combination with GCC.
This PR adds support for building librsvg for the llvm-mingw ARM/ARM64 targets by compiling the nightly version of Rust and using the
build-std
feature to compile the standard library itself. This approach makes us independent of the prebuilt binaries provided by Rust and allows us to safely use UCRT as default CRT library (instead than MSVCRT).A small amount of patches against Rust makes this possible, some of them are incompatible with the GCC targets that Rust provides. For example, it removes the need of linking against
libgcc
,libgcc_eh
andlibgcc_s
and it forces the entry point toDllMainCRTStartup
(or_DllMainCRTStartup
for i686) located in MinGW. This works for our use-case, but might break when building Rust executables our using LLD in combination with GCC.Resolves: https://github.com/libvips/build-win64-mxe/issues/12. Stacked on top of: https://github.com/libvips/build-win64-mxe/pull/14.