Bug 179358

Summary: [WPE] Use linker script to control exported symbols
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: WPE WebKitAssignee: Michael Catanzaro <mcatanzaro>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, clopez, commit-queue, mcatanzaro, webkit-bug-importer
Priority: P2    
Version: Other   
Hardware: PC   
OS: Linux   
Bug Depends on: 179492    
Bug Blocks: 178894    
Attachments:
Description Flags
Patch none

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.