Integrated: 8372643: Warning message on macos when building the JDK - (arm64) /tmp/lto.o unable to open object file: No such file or directory

Matthias Baesken mbaesken at openjdk.org
Thu Dec 4 08:39:09 UTC 2025


On Fri, 28 Nov 2025 15:47:04 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> When building the recent mainline JDK (26), I see the following warning messages:
> 
> warning: (arm64) /tmp/lto.o unable to open object file: No such file or directory
> warning: no debug symbols in executable (-arch arm64)
> 
> 
> The build completes normally even with these warnings.
> I am on macos aarch64, but I see the same warning on macos x64 and aarch64 in our CI.
> Seems we miss a linker flag for libs built with lto (libsplashscreen), because the Apple linker has the following issue
> 
> https://clang.llvm.org/docs/CommandGuide/clang.html
> Note
> 
> `
> On Darwin, when using [-flto](https://clang.llvm.org/docs/CommandGuide/clang.html#cmdoption-flto) along with [-g](https://clang.llvm.org/docs/CommandGuide/clang.html#cmdoption-g) and compiling and linking in separate steps, you also need to pass -Wl,-object_path_lto,<lto-filename>.o at the linking step to instruct the ld64 linker not to delete the temporary object file generated during Link Time Optimization (this flag is automatically passed to the linker by Clang if compilation and linking are done in a single step). This allows debugging the executable as well as generating the .dSYM bundle using dsymutil(1).`

This pull request has now been integrated.

Changeset: 317daa3c
Author:    Matthias Baesken <mbaesken at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/317daa3c004fbb1738e0af6acfbaf50c403c8230
Stats:     5 lines in 1 file changed: 5 ins; 0 del; 0 mod

8372643: Warning message on macos when building the JDK - (arm64) /tmp/lto.o unable to open object file: No such file or directory

Reviewed-by: erikj

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

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


More information about the build-dev mailing list