Bug 179358 - [WPE] Use linker script to control exported symbols
Summary: [WPE] Use linker script to control exported symbols
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WPE WebKit (show other bugs)
Version: Other
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords:
Depends on: 179492
Blocks: 178894
  Show dependency treegraph
 
Reported: 2017-11-06 18:48 PST by Michael Catanzaro
Modified: 2017-11-15 09:33 PST (History)
5 users (show)

See Also:


Attachments
Patch (2.65 KB, patch)
2017-11-06 18:51 PST, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2017-11-06 18:48:51 PST
The C API is being inadvertently exported because it's marked as WEBKIT_EXPORT in the header files. But of course it should only be exported in DEVELOPER_MODE, where it's needed for WebKitTestRunner. Use (almost) the same linker version script as GTK to fix this. It's slightly different because WPE does not have WebKitPluginProcess.

This also reduces binary size of libWPEWebKit.so in debug mode from 615 MB down to 497 MB. (Haven't checked release mode.)

This will break the WIP fdo backend of dyz. We should discuss which parts of the C API are really needed there (I don't immediately see anything), and how to expose them in the GLib API if needed.
Comment 1 Michael Catanzaro 2017-11-06 18:51:25 PST
Created attachment 326181 [details]
Patch
Comment 2 Carlos Alberto Lopez Perez 2017-11-09 10:49:55 PST
Comment on attachment 326181 [details]
Patch

This breaks dyz for me:

lib/wpe.lua:125: /home/clopez/webkit/wpe/WebKitBuild/Release/lib/libWPEWebKit.so: undefined symbol: WKPageConfigurationSetContext
Comment 3 Carlos Alberto Lopez Perez 2017-11-09 11:11:26 PST
(In reply to Carlos Alberto Lopez Perez from comment #2)
> Comment on attachment 326181 [details]
> Patch
> 
> This breaks dyz for me:
> 
> lib/wpe.lua:125:
> /home/clopez/webkit/wpe/WebKitBuild/Release/lib/libWPEWebKit.so: undefined
> symbol: WKPageConfigurationSetContext

Ok.. that is because the WPE JHBuild is still building an old version of dyz that uses the C API. Let's update it first.
Comment 4 Carlos Alberto Lopez Perez 2017-11-09 11:34:21 PST
(In reply to Michael Catanzaro from comment #0)

> This also reduces binary size of libWPEWebKit.so in debug mode from 615 MB
> down to 497 MB. (Haven't checked release mode.)
> 

Nice.

In Release it reduces it in ~74 KBs less (after stripping).. Better than nothing
Comment 5 WebKit Commit Bot 2017-11-09 12:56:07 PST
Comment on attachment 326181 [details]
Patch

Clearing flags on attachment: 326181

Committed r224642: <https://trac.webkit.org/changeset/224642>
Comment 6 WebKit Commit Bot 2017-11-09 12:56:08 PST
All reviewed patches have been landed.  Closing bug.