[Mesa-dev] Cross-compile from Linux to Windows

Eric Anholt eric at anholt.net
Mon Nov 9 18:26:22 UTC 2020


On Mon, Nov 9, 2020 at 2:19 AM Federico Dossena <info at fdossena.com> wrote:
>
> I'm sorry to bother you in the dev list but it seems to be the only one
> with activity so it seems like the best place to ask.
>
> I maintain some Mesa builds for Windows. These are builds of libgl-gdi
> with llvmpipe, for both x86 and x86_64; in other words, they're
> opengl32.dll files that users can drop into their game/application to
> have software rendering for OpenGL as a workaround for broken drivers or
> as a fallback for older systems.
> I've always used scons on Windows and msvc as a compiler to make these
> builds, but now that scons is being deprecated I've been trying to use
> meson and ninja to cross-compile from Linux (amd64) to Windows (both x86
> and x86_64) without much success. I can get regular Linux builds without
> issues though.
>
> I tried reading the Mesa documentation on cross-compiling but it's very
> minimal and it's partially obsolete so I thought it would be best to ask
> you directly: how do I make these builds? Explain like I'm 5, basically.

I would recommend looking at the windows builds we have in CI as your guide.

https://gitlab.freedesktop.org/mesa/mesa/tree/master/.gitlab-ci/windows


More information about the mesa-dev mailing list