[Win] Cross-compiling the Windows port from Linux#57907
[Win] Cross-compiling the Windows port from Linux#57907iangrunert wants to merge 1 commit intoWebKit:mainfrom
Conversation
|
EWS run on previous version of this PR (hash 7c49cbc) Details |
|
This is not yet ready to land, but I want to get EWS feedback to make sure it doesn't break the regular Windows build or any of the other builds. I need to push a vcpkg release somewhere (likely https://github.com/WebKitForWindows/WebKitRequirements), or fix the vcpkg build on Linux. |
7c49cbc to
13ca7bd
Compare
|
EWS run on previous version of this PR (hash 13ca7bd) Details |
13ca7bd to
12106be
Compare
|
EWS run on previous version of this PR (hash 12106be) Details |
12106be to
0b9a3a2
Compare
|
EWS run on previous version of this PR (hash 0b9a3a2) Details |
0b9a3a2 to
dc392d9
Compare
|
EWS run on previous version of this PR (hash dc392d9) Details |
dc392d9 to
01e7f20
Compare
|
EWS run on previous version of this PR (hash 01e7f20) Details |
01e7f20 to
988cf49
Compare
|
EWS run on previous version of this PR (hash 988cf49) Details |
988cf49 to
82de4ca
Compare
|
EWS run on previous version of this PR (hash 82de4ca) Details |
82de4ca to
4ab5a3b
Compare
|
EWS run on previous version of this PR (hash 4ab5a3b) Details |
4ab5a3b to
fcb8171
Compare
|
EWS run on previous version of this PR (hash fcb8171) Details |
fcb8171 to
4da551a
Compare
|
EWS run on previous version of this PR (hash 4da551a) Details |
4da551a to
2f8876a
Compare
|
EWS run on previous version of this PR (hash 2f8876a) Details |
2f8876a to
efa0d1d
Compare
|
EWS run on previous version of this PR (hash efa0d1d) Details |
efa0d1d to
66b43e4
Compare
|
EWS run on previous version of this PR (hash 66b43e4) Details |
66b43e4 to
13bac0f
Compare
|
EWS run on previous version of this PR (hash 13bac0f) Details |
13bac0f to
06aaf3c
Compare
|
EWS run on previous version of this PR (hash 06aaf3c) Details |
|
I think this is ready to review. Unfortunately it doesn't work when running an x86_64 Docker container on an ARM64 Mac; this configuration doesn't play nicely with wine (with or without Rosetta). I'm hoping to work on ARM64 builds under a separate bug. |
06aaf3c to
550954a
Compare
|
EWS run on previous version of this PR (hash 550954a) Details |
gsnedders
left a comment
There was a problem hiding this comment.
I haven't closely reviewed all the CMake stuff here; the non-CMake changes look fine to me.
One kinda nit, and one question about why we're hardcoding specific versions of Clang/LLVM:
| # Force clang-cl-20 for cross-compilation (use absolute paths) | ||
| push @args, '-DCMAKE_C_COMPILER=/usr/bin/clang-cl-20'; | ||
| push @args, '-DCMAKE_CXX_COMPILER=/usr/bin/clang-cl-20'; | ||
| push @args, '-DCMAKE_LINKER=/usr/bin/lld-link-20'; | ||
| push @args, '-DCMAKE_AR=/usr/bin/llvm-lib-20'; | ||
| push @args, '-DCMAKE_RC_COMPILER=/usr/bin/llvm-rc-20'; | ||
| push @args, '-DCMAKE_MT=/usr/bin/llvm-mt-20'; |
There was a problem hiding this comment.
It feels slightly surprising we're forcing a specific version of LLVM/Clang?
There was a problem hiding this comment.
I ran into a compilation error on LLVM-21 that I felt like it should get reviewed separately, at which point we should be able to relax this to point at non-versioned paths and check LLVM version > 20 inside check-win-cross-build-deps.
| sub isWinCrossCompileFromLinux() | ||
| { | ||
| return isWin() && isLinux(); | ||
| } |
There was a problem hiding this comment.
Kinda a nit:
This does have the problem of "if we ever support cross-compiling for Linux from Windows, this is ambiguous".
There was a problem hiding this comment.
That's fair; the flags in general are a little confusing as it's not immediately clear if we're checking "what platform is this running on" or "what port are we building" (e.g. in this case, isWin refers to the port and isLinux refers to the OS it's running on).
Could probably clean up the flags to make it clearer which is being checked.
550954a to
09b6649
Compare
|
EWS run on previous version of this PR (hash 09b6649) Details |
09b6649 to
236c074
Compare
|
EWS run on previous version of this PR (hash 236c074) Details |
https://bugs.webkit.org/show_bug.cgi?id=282276 Reviewed by NOBODY (OOPS!). Added check-win-cross-build-deps script, that validates the required dependencies and helps the user download them as required. Fixes for case sensitivity issues in header includes. Using the WebKitLibraries/windows folder as a download location for required files - Windows SDK, clang_rt builtins, etc. Changes to build-webkit, webkitdirs.pm to support running build-webkit --win on a Linux host. The vcpkg upgrade updated some libraries, which required a couple of fixes: Curl upgrade required some small changes to CurlRequest fix broken tests. Harfbuzz upgrade broke a couple of tests - one is marked as a failure already for glib based ports, the other is similar but we may be on an even newer version of Harfbuzz compared to WPE / GTK.
236c074 to
1cb5029
Compare
|
EWS run on current version of this PR (hash 1cb5029) Details |
|
The remaining win-tests failures caused by the curl / harfbuzz version bumps have been fixed. |
🧪 mac-AS-debug-wk2
https://bugs.webkit.org/show_bug.cgi?id=282276
Reviewed by NOBODY (OOPS!).
Added check-win-cross-build-deps script, that validates the required
dependencies and helps the user download them as required.
Fixes for case sensitivity issues in header includes.
Using the WebKitLibraries/windows folder as a download location for required
files - Windows SDK, clang_rt builtins, etc.
Changes to build-webkit, webkitdirs.pm to support running build-webkit --win on
a Linux host.
1cb5029