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

Andrew Haley aph at openjdk.org
Wed Nov 19 19:11:02 UTC 2025


On Wed, 19 Nov 2025 16:31:58 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> Seems like we should fix the elimination of those debug helpers ; but those are only in the jvm lib. The situation in other libs is different.

Maybe, but it's not just the specific debug helpers. There are many functions in hotspot, and the maintenance programmer (in the case of Mac/AArch64, that's often me) will frequently type stuff like `print a->size()`. 

Linker options that strip "unused" code in binaries have been available for decades, and we haven't much used such options because they're a pain. Debugging on MacOS/AArch64 is a pain as it is, without making it worse.

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

PR Comment: https://git.openjdk.org/jdk/pull/28319#issuecomment-3554226232


More information about the build-dev mailing list