Bug 187781

Summary: Adjust WEBCORE_EXPORT annotations for LTO
Product: WebKit Reporter: Keith Rollin <krollin>
Component: WebCore Misc.Assignee: Keith Rollin <krollin>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, commit-queue, ddkilzer, ews-watchlist, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=186944
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews206 for win-future none

Description Keith Rollin 2018-07-18 14:19:44 PDT
Continuation of Bug 186944. This bug addresses issues not caught during the first pass of adjustments. The initial work focussed on macOS; this one addresses issues found when building for iOS. From 186944:

Adjust a number of places that result in WebKit's 'check-for-weak-vtables-and-externals' script reporting weak external symbols:

    ERROR: WebCore has a weak external symbol in it (/Volumes/Data/dev/webkit/OpenSource/WebKitBuild/Release/WebCore.framework/Versions/A/WebCore)
    ERROR: A weak external symbol is generated when a symbol is defined in multiple compilation units and is also marked as being exported from the library.
    ERROR: A common cause of weak external symbols is when an inline function is listed in the linker export file.
    ...

These cases are caused by inline methods being marked with WTF_EXPORT (or related macro) or with an inline function being in a class marked as such, and when enabling LTO builds.

For the most part, address these by removing the WEBCORE_EXPORT annotation from inline methods. In some cases, move the implementation out-of-line because it's the class that has the WEBCORE_EXPORT on it and removing the annotation from the class would be too disruptive. Finally, in other cases, move the implementation out-of-line because check-for-weak-vtables-and-externals still complains when keeping the implementation inline and removing the annotation; this seems to typically (but not always) happen with destructors.
Comment 1 Radar WebKit Bug Importer 2018-07-18 14:20:04 PDT
<rdar://problem/42351124>
Comment 2 Keith Rollin 2018-07-18 14:38:03 PDT
Created attachment 345285 [details]
Patch
Comment 3 EWS Watchlist 2018-07-18 14:40:07 PDT
Attachment 345285 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/FourCC.h:33:  Should be indented on a separate line, with the colon or comma first on that line.  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/graphics/IntPoint.h:73:  Should be indented on a separate line, with the colon or comma first on that line.  [whitespace/indent] [4]
Total errors found: 2 in 12 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 EWS Watchlist 2018-07-19 02:09:05 PDT
Comment on attachment 345285 [details]
Patch

Attachment 345285 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/8584359

New failing tests:
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-video.html
http/tests/preload/onload_event.html
Comment 5 EWS Watchlist 2018-07-19 02:09:16 PDT
Created attachment 345338 [details]
Archive of layout-test-results from ews206 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews206  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 6 WebKit Commit Bot 2018-07-19 10:43:42 PDT
Comment on attachment 345285 [details]
Patch

Clearing flags on attachment: 345285

Committed r233990: <https://trac.webkit.org/changeset/233990>
Comment 7 WebKit Commit Bot 2018-07-19 10:43:43 PDT
All reviewed patches have been landed.  Closing bug.