<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>282276</bug_id>
          
          <creation_ts>2024-10-29 13:31:24 -0700</creation_ts>
          <short_desc>[Win] Cross-compiling the Windows port from Linux</short_desc>
          <delta_ts>2026-03-11 08:40:50 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CMake</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>309681</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Ian Grunert">ian.grunert</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>fujii</cc>
    
    <cc>jay.bhaskar</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2071365</commentid>
    <comment_count>0</comment_count>
    <who name="Ian Grunert">ian.grunert</who>
    <bug_when>2024-10-29 13:31:24 -0700</bug_when>
    <thetext>It would make it easier for more WebKit maintainers to fix Windows build issues. It&apos;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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2071471</commentid>
    <comment_count>1</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2024-10-29 17:09:22 -0700</bug_when>
    <thetext>glandium.org » Blog Archive » Standing up the Cross-Compilation of Firefox for Windows on Linux
https://glandium.org/blog/?p=4020</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2072922</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-11-05 12:32:15 -0800</bug_when>
    <thetext>&lt;rdar://problem/139306427&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2170044</commentid>
    <comment_count>3</comment_count>
    <who name="Ian Grunert">ian.grunert</who>
    <bug_when>2026-01-07 11:32:30 -0800</bug_when>
    <thetext>We&apos;d have to switch vcpkg to compile it&apos;s dependencies using clang-cl as well.

Building icu with clang-cl seems to fail:

```
[554/556] C:\WINDOWS\system32\cmd.exe /C &quot;cd /D S:\WebKit\WebKitBuild\Debug\vcpkg_installed\vcpkg\blds\icu\x64-windows-webkit-dbg &amp;&amp; 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 &amp;&amp; &quot;C:\Program Files\CMake\bin\cmake.exe&quot; -E touch S:/WebKit/WebKitBuild/Debug/vcpkg_installed/vcpkg/blds/icu/x64-windows-webkit-dbg/data/out/icudata_asm_file_stamp&quot;
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 &quot;cd /D S:\WebKit\WebKitBuild\Debug\vcpkg_installed\vcpkg\blds\icu\x64-windows-webkit-dbg &amp;&amp; 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 &amp;&amp; &quot;C:\Program Files\CMake\bin\cmake.exe&quot; -E touch S:/WebKit/WebKitBuild/Debug/vcpkg_installed/vcpkg/blds/icu/x64-windows-webkit-dbg/data/out/icudata_asm_file_stamp&quot;
ninja: build stopped: subcommand failed.
```

Might work after icu is updated past 78.1:

https://unicode-org.atlassian.net/browse/ICU-23151</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2171534</commentid>
    <comment_count>4</comment_count>
    <who name="Ian Grunert">ian.grunert</who>
    <bug_when>2026-01-13 13:16:48 -0800</bug_when>
    <thetext>https://github.com/mstorsjo/msvc-wine

This might be able to run MSVC on Linux via wine to solve the vcpkg problem (as well as solving the problem of downloading the required headers and libraries)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2180407</commentid>
    <comment_count>5</comment_count>
    <who name="Ian Grunert">ian.grunert</who>
    <bug_when>2026-02-11 12:15:31 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/57907</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2188808</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-03-10 13:08:18 -0700</bug_when>
    <thetext>Committed 309008@main (da4f01ed87f0): &lt;https://commits.webkit.org/309008@main&gt;

Reviewed commits have been landed. Closing PR #57907 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>