RFR: 8343698: Linux x86_64 lto build gives a lot of warnings and fails lto-wrapper: fatal error: make returned 2 exit status [v3]

Matthias Baesken mbaesken at openjdk.org
Mon Nov 18 13:25:45 UTC 2024


On Mon, 18 Nov 2024 12:38:37 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> A first nice advantage seems to be the smaller size of libjvm.so coming from the lto build; lto build
> 
> ```
> du -sh images/jdk/lib/server/libjvm.so
> 22M	images/jdk/lib/server/libjvm.so
> ```
> 
> normal build
> 
> ```
> du -sh images/jdk/lib/server/libjvm.so
> 26M	images/jdk/lib/server/libjvm.so
> ```
> 
> This is in line to what TI claims here for some lto vs non-lto builds (but at TI for aarch/arm and not for x86_64) https://software-dl.ti.com/codegen/docs/tiarmclang/compiler_tools_user_guide/compiler_manual/link_time_optimization/lto_benefits.html#code-size-reduction-due-to-use-of-lto


When switching to size-optimization (adding `--enable-jvm-feature-opt-size=yes` to both the lto and 'normal' build)  this changes to
lto build

du -sh images/jdk/lib/server/libjvm.so
17M	images/jdk/lib/server/libjvm.so

normal build

du -sh images/jdk/lib/server/libjvm.so
21M	images/jdk/lib/server/libjvm.so

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

PR Comment: https://git.openjdk.org/jdk/pull/22069#issuecomment-2483031442


More information about the build-dev mailing list