| 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: | bfulgham, commit-queue, ddkilzer, ews-watchlist, fpizlo, keith_miller, mark.lam, saam, 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=187781 | ||||||||
| Attachments: |
|
||||||||
Created attachment 343380 [details]
Patch
Attachment 343380 [details] did not pass style-queue:
ERROR: Source/WebCore/platform/mac/PlaybackSessionInterfaceMac.h:53: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
Total errors found: 1 in 17 files
If any of these errors are false positives, please file a bug against check-webkit-style.
That warning can be ignored for now. LTO builds succeed despite it. Comment on attachment 343380 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=343380&action=review r=me > Source/WebCore/ChangeLog:29 > + 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. Moving destructors out-of-line can save disk space in the binary as well! > Source/WebCore/workers/service/server/SWServer.h:72 > - WEBCORE_EXPORT virtual ~Connection() { } > + virtual ~Connection() { } This can be changed to: virtual ~Connection() = default; (In reply to Keith Rollin from comment #4) > That warning can be ignored for now. LTO builds succeed despite it. ERROR: Source/WebCore/platform/mac/PlaybackSessionInterfaceMac.h:53: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4] Total errors found: 1 in 17 files Why not just fix it? It's clearly wrong. Please fix. OK. I've made the requested changes. Created attachment 343565 [details]
Patch
Comment on attachment 343565 [details] Patch Clearing flags on attachment: 343565 Committed r233189: <https://trac.webkit.org/changeset/233189> All reviewed patches have been landed. Closing bug. |
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.