Re: Clang toolchain type should not be bound with LLD

2025-01-24 Thread Magnus Ihse Bursie
On 2025-01-22 16:16, Bingwu Zhang wrote: Hi! I have signed the individual OCA agreement but it has been still showing "Under Review" for 24 hours. I will make a PR as soon as it is reviewed. I think it will not require too much work to support other linker combinations, almost no extra work.

Re: Clang toolchain type should not be bound with LLD

2025-01-22 Thread Bingwu Zhang
Hi! I have signed the individual OCA agreement but it has been still showing "Under Review" for 24 hours. I will make a PR as soon as it is reviewed. I think it will not require too much work to support other linker combinations, almost no extra work. On most Linux distributions, Clang uses th

Re: Clang toolchain type should not be bound with LLD

2025-01-22 Thread Erik Joelsson
Hello, I would say that we aren't against taking in variables on the configure command line for setting executables to use in the build, as that's a well established standard way of doing just that with Autoconf. The built in Autoconf macros for CC and similar executables pick up such variabl

Re: Clang toolchain type should not be bound with LLD

2025-01-22 Thread Julian Waters
Hi! I believe it's not a hard requirement that special variables can't be used, just that it's strongly discouraged in favour of configure options. I'm not sure if we support linker combinations other than the one the compiler comes with, the extent of my knowledge is that I think Oracle uses gold

Re: Clang toolchain type should not be bound with LLD

2025-01-22 Thread Bingwu Zhang
Hi! The patch I mentioned in last message will first try to resolve the full, absolute path of lld, and use --ld-path to pass the path to Clang. It should have the same effect as passing -fuse-ld=lld. If it failed to do so, it will fallback to use -fuse-ld=lld to let Clang pick up the proper li

Clang toolchain type should not be bound with LLD

2025-01-22 Thread Bingwu Zhang
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

Re: Clang toolchain type should not be bound with LLD

2025-01-22 Thread Julian Waters
Hi! Welcome to OpenJDK! I believe clang being forced to use lld is by design, in https://github.com/openjdk/jdk/pull/19456 this was done to make handling of command lines easier in the build system. Changing this to be flexible is probably still possible, but will involve some more work than just