Skip to content

Draft: build/windows: Crossbuild GIMP with 'llvm-mingw'

Bruno requested to merge bruno/llvm-mingw into master

Fixes #11756

This patch (if approved) make crossroad compiler-agnostic and add support for llvm-mingw (aka clang that links to UCRT) which should work with MSYS2 binaries from CLANG64 repo. This also makes easier to add Fedora UCRT support in the future.

To test, just run bash build/windows/1_build-deps-crossroad.sh from gimp repo in bruno/llvm-mingw branch


@Jehan I need help, however, since I am getting an error about the compiler not being found on PATH, even I adding it to path:.

../meson.build:1:0: ERROR: Unable to get clang pre-processor defines:
Compiler stdout:
** [Crossroad] Error: actual compiler (/builds/GNOME/gimp/.local/share/crossroad/bin/x86_64-w64-mingw32-clang) does not exist in your PATH.
-----
Compiler stderr:
/builds/GNOME/gimp/.local/share/crossroad/bin/x86_64-w64-mingw32-clang: 149: Bad substitution
-----

This is probably due to the way llvm-mingw ships clang with too many linking and wrapping that crossroad isn't prepared to handle gracefully. In short, clang is being called this way: .local/share/crossroad/bin/x86_64-w64-mingw32-clang > .local/share/crossroad/scripts/bin-wrappers/crossroad-cc > llvm-mingw/bin/x86_64-w64-mingw32-clang > llvm-mingw/bin/clang-target-wrapper.sh > llvm-mingw/bin/clang > llvm-mingw/bin/clang18

Merge request reports

Loading