Bug 282276
| Summary: | [Win] Cross-compiling the Windows port from Linux | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ian Grunert <ian.grunert> |
| Component: | CMake | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | fujii.hironori, jay.bhaskar, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | PC | ||
| OS: | Unspecified | ||
Ian Grunert
It would make it easier for more WebKit maintainers to fix Windows build issues. It's more likely that contributors have a Linux dev environment setup than a Windows one.
Windows compiles under clang-cl now, and links with lld-link, so no MASM.exe to worry about.
We'll need something like https://github.com/Jake-Shadle/xwin to download the Microsoft CRT headers and libraries, and Windows SDK headers and libraries - we might want to integrate it into the existing script that downloads WebKitRequirements and put the files in WebKitLibraries.
Use the /vctoolsdir and /winsdkdir flags for clang-cl to point at the CRT and SDK directories, which should expand out into the required compilation / linker flags.
Some CMake changes will be needed to duct tape these pieces together - in particular the /vctoolsdir and /winsdkdir flags.
Might require some changes to Scripts like build-webkit etc.
----
Running the MiniBrowser / jsc via wine might need other changes, but being able to build would be the first step.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Fujii Hironori
glandium.org » Blog Archive » Standing up the Cross-Compilation of Firefox for Windows on Linux
https://glandium.org/blog/?p=4020
Radar WebKit Bug Importer
<rdar://problem/139306427>
Ian Grunert
We'd have to switch vcpkg to compile it's dependencies using clang-cl as well.
Building icu with clang-cl seems to fail:
```
[554/556] C:\WINDOWS\system32\cmd.exe /C "cd /D S:\WebKit\WebKitBuild\Debug\vcpkg_installed\vcpkg\blds\icu\x64-windows-webkit-dbg && S:\WebKit\WebKitBuild\Debug\vcpkg_installed\vcpkg\blds\icu\x64-windows-webkit-dbg\bin\pkgdata -f -v -c -s S:/WebKit/WebKitBuild/Debug/vcpkg_installed/vcpkg/blds/icu/x64-windows-webkit-dbg/data/out/build/icudt77l -d S:/WebKit/WebKitBuild/Debug/vcpkg_installed/vcpkg/blds/icu/x64-windows-webkit-dbg/data/out -e icudt77 -T S:/WebKit/WebKitBuild/Debug/vcpkg_installed/vcpkg/blds/icu/x64-windows-webkit-dbg/data/out/tmp -p icudt77l -m dll -L icudt S:/WebKit/WebKitBuild/Debug/vcpkg_installed/vcpkg/blds/icu/x64-windows-webkit-dbg/data/out/tmp/icudata.lst && "C:\Program Files\CMake\bin\cmake.exe" -E touch S:/WebKit/WebKitBuild/Debug/vcpkg_installed/vcpkg/blds/icu/x64-windows-webkit-dbg/data/out/icudata_asm_file_stamp"
FAILED: data/out/tmp/icudt77l_dat.obj data/out/icudata_asm_file_stamp S:/WebKit/WebKitBuild/Debug/vcpkg_installed/vcpkg/blds/icu/x64-windows-webkit-dbg/data/out/tmp/icudt77l_dat.obj S:/WebKit/WebKitBuild/Debug/vcpkg_installed/vcpkg/blds/icu/x64-windows-webkit-dbg/data/out/icudata_asm_file_stamp
C:\WINDOWS\system32\cmd.exe /C "cd /D S:\WebKit\WebKitBuild\Debug\vcpkg_installed\vcpkg\blds\icu\x64-windows-webkit-dbg && S:\WebKit\WebKitBuild\Debug\vcpkg_installed\vcpkg\blds\icu\x64-windows-webkit-dbg\bin\pkgdata -f -v -c -s S:/WebKit/WebKitBuild/Debug/vcpkg_installed/vcpkg/blds/icu/x64-windows-webkit-dbg/data/out/build/icudt77l -d S:/WebKit/WebKitBuild/Debug/vcpkg_installed/vcpkg/blds/icu/x64-windows-webkit-dbg/data/out -e icudt77 -T S:/WebKit/WebKitBuild/Debug/vcpkg_installed/vcpkg/blds/icu/x64-windows-webkit-dbg/data/out/tmp -p icudt77l -m dll -L icudt S:/WebKit/WebKitBuild/Debug/vcpkg_installed/vcpkg/blds/icu/x64-windows-webkit-dbg/data/out/tmp/icudata.lst && "C:\Program Files\CMake\bin\cmake.exe" -E touch S:/WebKit/WebKitBuild/Debug/vcpkg_installed/vcpkg/blds/icu/x64-windows-webkit-dbg/data/out/icudata_asm_file_stamp"
ninja: build stopped: subcommand failed.
```
Might work after icu is updated past 78.1:
https://unicode-org.atlassian.net/browse/ICU-23151