Bug 172862 - [JSCOnly] Support building jsc.exe with dynamic JSC library on Windows
Summary: [JSCOnly] Support building jsc.exe with dynamic JSC library on Windows
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Don Olmstead
URL:
Keywords: InRadar
Depends on:
Blocks: 172144
  Show dependency treegraph
 
Reported: 2017-06-02 10:09 PDT by Stephan Szabo
Modified: 2024-01-26 17:24 PST (History)
4 users (show)

See Also:


Attachments
fix shared jsc shell builds on windows (4.26 KB, patch)
2017-07-14 11:20 PDT, Vladimir Vukicevic
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>