On Fri, 14 Nov 2025 11:25:05 GMT, Matthias Baesken <[email protected]> wrote:

> The dead_strip linker option on macOS removes functions and data that are 
> unreachable by the entry point or exported symbols.
> Setting it can reduce the size of some binaries we generate quite a lot, for 
> example (product build, Xcode 15 is used) :
> (before -> after setting the option)
> 
> 1.4M -> 1.1M images/jdk/lib/libfontmanager.dylib
> 264K -> 248K images/jdk/lib/libjavajpeg.dylib
> 152K -> 132K images/jdk/lib/libjli.dylib
> 388K -> 296K images/jdk/lib/liblcms.dylib
> 164K -> 128K images/jdk/lib/libzip.dylib
> 
> 
> and libjvm :
> 
> 20M -> 18M images/jdk/lib/server/libjvm.dylib
> 146M -> 137M images/jdk/lib/server/libjvm.dylib.dSYM

This pull request has now been integrated.

Changeset: 8f3d0ade
Author:    Matthias Baesken <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/8f3d0ade11ddb45bb1719b6818e1b51df237a59b
Stats:     3 lines in 1 file changed: 3 ins; 0 del; 0 mod

8371893: [macOS] use dead_strip linker option to reduce binary size

Reviewed-by: erikj, lucy, serb

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

PR: https://git.openjdk.org/jdk/pull/28319

Reply via email to