On Wed, 15 Dec 2021 22:57:26 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

>> Build change to strip the non-global symbols from native shared libraries on 
>> Linux and macOS by running `strip -x`, unless doing a `-PCONF=DebugNative` 
>> build.
>> 
>> Here is a before / after size comparison. All sizes in KBytes:
>> 
>> ### Linux
>> 
>> | Native Library | Current | Stripped |
>> | --------------- | --------- | -------- |
>> | libavplugin-54.so | 52 | 48 |
>> | libavplugin-56.so | 52 | 48 |
>> | libavplugin-57.so | 52 | 48 |
>> | libavplugin-ffmpeg-56.so | 52 | 48 |
>> | libavplugin-ffmpeg-57.so | 52 | 48 |
>> | libavplugin-ffmpeg-58.so | 52 | 48 |
>> | libdecora_sse.so | 76 | 72 |
>> | libfxplugins.so | 56 | 52 |
>> | libglass.so | 16 | 12 |
>> | libglassgtk2.so | 932 | 324 |
>> | libglassgtk3.so | 932 | 324 |
>> | libgstreamer-lite.so | 2,280 | 2,100 |
>> | libjavafx_font.so | 20 | 16 |
>> | libjavafx_font_freetype.so | 28 | 28 |
>> | libjavafx_font_pango.so | 28 | 24 |
>> | libjavafx_iio.so | 148 | 140 |
>> | libjfxmedia.so | 2,048 | 516 |
>> | libjfxwebkit.so | 106,696 | 88,428 |
>> | libprism_common.so | 8 | 8 |
>> | libprism_es2.so | 64 | 64 |
>> | libprism_sw.so | 68 | 64 |
>> 
>> ### macOS
>> 
>> | Native Library | Current | Stripped |
>> | --------------- | --------- | -------- |
>> | libdecora_sse.dylib | 88 | 88 |
>> | libfxplugins.dylib | 88 | 84 |
>> | libglass.dylib | 360 | 324 |
>> | libglib-lite.dylib | 1,192 | 1,148 |
>> | libgstreamer-lite.dylib | 1,708 | 1584 |
>> | libjavafx_font.dylib | 64 | 64 |
>> | libjavafx_iio.dylib | 308 | 300 |
>> | libjfxmedia.dylib | 212 | 200 |
>> | libjfxmedia_avf.dylib | 100 | 88 |
>> | libjfxwebkit.dylib | 85,896 | 71,636 |
>> | libprism_common.dylib | 20 | 20 |
>> | libprism_es2.dylib | 64 | 64 |
>> | libprism_sw.dylib | 88 | 88 |
>
> Kevin Rushforth has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Only strip binaries when doing a production build (`-PCONF=Release`)

I don't think that stripping unused symbols is necessary for debug builds, and 
it's okay to only enable such optimizations for release builds.

-------------

PR: https://git.openjdk.java.net/jfx/pull/695

Reply via email to