Clang toolchain type should not be bound with LLD
Bingwu Zhang
xtex at envs.net
Wed Jan 22 08:19:56 UTC 2025
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 <xtex at aosc.io>
xtex @ Wed, 22 Jan 2025 07:17:03 +0000
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part.
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20250122/bcf72b71/signature.asc>
More information about the build-dev
mailing list