Bug 114705

Summary: [Windows, WinCairo] Stop individually compiling WTF files in JSC Utility and WebCore
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: JavaScriptCoreAssignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, commit-queue, paroga
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 114714    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch andersca: review+

Description Brent Fulgham 2013-04-16 15:20:22 PDT
Several WTF files were being individually build and linked into the JSC executable.  Instead, we should simply export those symbols from the JavaScriptCore library (where they are already defined) and use them from the JSC executable.
Comment 1 Brent Fulgham 2013-04-16 15:25:22 PDT
Created attachment 198443 [details]
Patch
Comment 2 Brent Fulgham 2013-04-17 00:04:42 PDT
Created attachment 198473 [details]
Patch
Comment 3 Brent Fulgham 2013-04-17 00:05:48 PDT
WebCore was also manually building these files, so exporting the symbols from JavaScriptCore.dll caused a build failure. The most recent patch resolves that issue.
Comment 4 Brent Fulgham 2013-04-17 11:07:27 PDT
Created attachment 198586 [details]
Patch
Comment 5 Brent Fulgham 2013-04-17 11:08:46 PDT
I had to add a bunch of symbols to our exports file so that WebCore could use the WTF implementations in JavaScriptCore.dll, rather than compiling its own copy of the files.  Sorry the patch is so big. :-(
Comment 6 Brent Fulgham 2013-04-17 11:37:06 PDT
Committed r148620: <http://trac.webkit.org/changeset/148620>
Comment 7 Patrick R. Gansterer 2013-04-18 13:07:18 PDT
Did you look at https://trac.webkit.org/changeset/59171 before you made this change?
AFAIK this ugly construct is not just for fun.
Comment 8 Brent Fulgham 2013-04-18 13:23:50 PDT
Bah!  Stupid history. It looks like Bug 38930 needs to be addressed somehow.

It still seems like the better thing to do would be to link any library that wants to use WTFString (and friends) to WTF directly, rather than exporting them from JavaScriptCore.
Comment 9 Patrick R. Gansterer 2013-04-18 13:31:31 PDT
(In reply to comment #8)
> Bah!  Stupid history. It looks like Bug 38930 needs to be addressed somehow.

+1 :) Rollout?

> It still seems like the better thing to do would be to link any library that wants to use WTFString (and friends) to WTF directly, rather than exporting them from JavaScriptCore.

Pleas think about using EXPORT macros for the Windows port too. There might be a bunch of problems when you link the symbols two time and it makes the stuff not really easier to understand....
IMHO the only right way is to create an additional "WTFString" static library.

BTW: Maybe you can implement the last missing part in the "export symbols on Windows" stuff: I only have a CMake based VS solution file. If you look at https://bugs.webkit.org/attachment.cgi?id=196804 and search for "generate-win32-export-forwards" you find the only missing part to get rid of the export file on Windows too.
Comment 10 Brent Fulgham 2013-06-13 09:09:15 PDT
This change has been superseded by https://bugs.webkit.org/show_bug.cgi?id=117050.