RFR: 8326587: Split Link.gmk into a Windows and Unix part

Erik Joelsson erikj at openjdk.org
Fri Feb 23 21:31:29 UTC 2024


On Fri, 23 Feb 2024 16:24:48 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

> There is not much overlap on how linking is done on Windows on one hand, and on all Unix platforms on the other. This makes Link.gmk basically consists of two parts, each in it own half of if statements, and the few common parts are artificially shoehorned in to fit both sides.
> 
> The code will be much clearer if we just split this into two different files.
> 
> Note that this PR slightly collides with JDK-8326583 (https://github.com/openjdk/jdk/pull/17986). Whichever of this goes in first will mean that the other one needs to make some adaptations.

Is it really a good idea to split makefiles based on target platform? It creates a less flexible separation that makes experimentation with different combinations of toolchains and platforms much harder. We currently have a pretty well established mapping between target platform and toolchain type in practice, while trying to keep the concepts somewhat separated, but this kind of change really cements that mapping. Given Julian's ambition for making it possible to compile for Windows using a different toolchain, I'm not sure this is the right way to go.

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

PR Comment: https://git.openjdk.org/jdk/pull/17987#issuecomment-1961739183


More information about the build-dev mailing list