> 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).`
Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: Move -Wl,-object_path_lto setting, and specify a file at OBJECT_DIR ------------- Changes: - all: https://git.openjdk.org/jdk/pull/28559/files - new: https://git.openjdk.org/jdk/pull/28559/files/66013e87..508122b3 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=28559&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28559&range=00-01 Stats: 10 lines in 2 files changed: 5 ins; 4 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/28559.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/28559/head:pull/28559 PR: https://git.openjdk.org/jdk/pull/28559
