Bug 172862

Summary: [JSCOnly] Support building jsc.exe with dynamic JSC library on Windows
Product: WebKit Reporter: Stephan Szabo <stephan.szabo>
Component: Tools / TestsAssignee: Don Olmstead <don.olmstead>
Status: RESOLVED FIXED    
Severity: Normal CC: don.olmstead, lforschler, vladimir, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 172144    
Attachments:
Description Flags
fix shared jsc shell builds on windows none

Description Stephan Szabo 2017-06-02 10:09:00 PDT
We've gotten statically linked jsc.exe on Windows from JSCOnly build, but need to support dynamically linked version as well.
Comment 1 Vladimir Vukicevic 2017-07-14 11:20:14 PDT
Created attachment 315461 [details]
fix shared jsc shell builds on windows

The reason for this is that the JSCOnly builds expect a static WTF (but don't define WTF_LIBRARY_TYPE, fixed that) that's compiled in to JavaScriptCore, but they still make WTF as part of the cmake target library dependencies.  Additionally, the -DSTATICALLY_LINKED_WITH_WTF gets propagated down to the jsc shell, which is also not correct.

The library thing (jscore.dll needs to link with WTF, but it should *not* tell downstream dependants that they need to link with WTF.lib) I fixed by introducing a public/private target_link_libraries split in WEBKIT_FRAMEWORK, and adding WTF to the private libs for jscore as appropriate.

The STATICALLY_LINKED_WITH_WTF define was done the same way, by adding it to the PRIVATE defines for JavaScriptCore if WTF is static.

The static linking of WTF also causes some problems because we don't actually get the WTF includes or WTF's own dependant libs (like winmm).  I hacked around that in the shell CMakeLists, but I'm not very happy about it.

With this, both static and shared JSCOnly builds work on Windows.  I have not tested any other config or any other platform, though.
Comment 2 Don Olmstead 2024-01-26 12:17:34 PST
Pull request: https://github.com/WebKit/WebKit/pull/23324
Comment 3 EWS 2024-01-26 17:23:59 PST
Committed 273589@main (9c4ef355f719): <https://commits.webkit.org/273589@main>

Reviewed commits have been landed. Closing PR #23324 and removing active labels.
Comment 4 Radar WebKit Bug Importer 2024-01-26 17:24:15 PST
<rdar://problem/121702710>