On Fri, 23 Feb 2024 16:24:48 GMT, Magnus Ihse Bursie <i...@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.

Ok, fair enough, I should have phrase this split as "Microsoft toolchain" and 
"everything else". The point is that linking is vastly different on Windows 
than on other platforms. Our efforts to force "lib" to behave as "ar" etc was 
far-fetched to begin with. And to fully support static libraries, we need to 
separate the static linking into several steps, running ld, objcopy and then 
finally ar There is no correspondence to of this at all with the Microsoft 
toolchain, and trying to shoehorn this in is just going to make matters worse.

I'll rename the split according to toolchain and not platform. (And then I 
think this will actually help Julian, since we'll push the microsoft 
strangeness away in a separate file.) Sounds OK to you then?

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

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

Reply via email to