(Hidden by Administrator)
Bug 1444914 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Google has worked out a linux->windows cross compile using clang-cl: https://chromium.googlesource.com/chromium/src/+/refs/heads/master/docs/win_cross.md It would be nice if we could work out the details to get this working for Firefox as well. Some potential benefits: * Developers could do Windows development on a Linux machine, where builds are faster and the environment is more conducive to development. * We could potentially switch our Windows builds in CI to be built on Linux, which would make them faster and also let us have more control over the build environment because we could use the same Docker image we use for other builds. * This would make it fairly straightforward to do a Windows build inside a WSL shell. I did a bunch of work on this in bug 1311729 (still ongoing), but because we have to invoke MSVC, which is a Windows binary, we have to deal with all sorts of path translation issues. If we were using native Linux clang-cl binaries this would be much simpler. Most of this ought to be fairly straightforward. In fact, my WSL patches have probably covered a lot of ground here--I had a build working with `--host=x86_64-pc-linux-gnu` and `--target=x86_64-pc-mingw32`, where the host compiler was gcc and the target compiler was MSVC. Additionally, we have mingw32 builds running in CI now, which are pretty similar, although they disable some features that we need to ship like accessibility. Google seems to have a few workarounds in their tree for the cross-compile case. They've got a Python reimplementation of rc.exe which we could probably use: https://chromium.googlesource.com/chromium/src/+/master/build/toolchain/win/rc/ They've also got checked-in copies of the output of some tools like midl.exe which don't have versions that run on Linux: https://chromium.googlesource.com/chromium/src/+/master/third_party/win_build_output/README.chromium We'd have to figure something out there for actual cross-compiles, certainly, but for the WSL case we could make this work by just running the Windows binaries.