On Tue, 2 Dec 2025 22:18:06 GMT, Erik Joelsson <[email protected]> wrote:

> In [JDK-8371626](https://bugs.openjdk.org/browse/JDK-8371626) a new linker 
> flag was introduced that only works with the Gold linker. The way the flag is 
> added is not compatible with cross compilation configurations where the 
> "build JDK" is built on the fly. In such a configuration, we are setting up 
> two distinct toolchains, the TARGET (basically the regular one, with no 
> variable prefixes) and the BUILD (an extra toolchain used to compile for the 
> build platform, variables have the prefix "BUILD_").
> 
> This patch adjusts the adding of this linker flag so that it's conditionally 
> added to each of the BUILD and TARGET linker flags depending on if the 
> corresponding toolchain is using the Gold linker.
> 
> I have verified with local builds, both native and cross, both that the 
> builds succeed and that the expected flag is added when it should be. I've 
> also run the full set of automated builds in our internal build and test 
> system.

Looks reasonable, thanks!

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

Marked as reviewed by shade (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/28619#pullrequestreview-3534021700

Reply via email to