Hi! Currently, when --with-toolchain-type=clang is set, the OpenJDK build system will force the C++ compiler to use LLD as linker [1].
However, Clang works with other linkers and other linkers work with Clang. LLD should not be the only possible linker. Thus I propose a patch [2], which makes configure script accept a LLD variable pointing to the path of linker to use. I have verified that specifying LLD=mold can compile OpenJDK 24+32 with mold. I wonder if anyone supports this idea and want to make it my first contribution to the (upstream) OpenJDK. So per the developer guide [3], I am writing this message to socialize my change and make some friends. I have signed off an individual agreement of Oracle Contributor Agreement yesterday, but it is still "Under Review". If someone agrees with my patch, it will be cherry-picked from my development tree, rebasing onto the main branch, and sent to openjdk/jdk as a PR later. Thanks for your reading! [1] https://github.com/openjdk/jdk/blob/ 15d6469e8da635364c0ba83e425fd149c2d69495/make/autoconf/flags-ldflags.m4#L74 [2] https://github.com/AOSC-Tracking/jdk/commit/ 507b5d77bc3a52f9b9a1a4f0019d423263c99a18 [3] https://openjdk.org/guide/ -- Bingwu Zhang <x...@aosc.io> xtex @ Wed, 22 Jan 2025 07:17:03 +0000
signature.asc
Description: This is a digitally signed message part.