On Mon, 26 Feb 2024 20:21:55 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:

>> The idea of setting up general "toolchains" in the native build was good, 
>> but it turned out that we really only need a single toolchain, with a single 
>> twist: if it should use CC or CPP to link. This is better described by a 
>> specific argument to SetupNativeCompilation, LANG := C++ or LANG := C (the 
>> default).
>> 
>> There is a single exception to this rule, and that is if we want to compile 
>> for the build platform rather than the target platform. (This is only done 
>> for adlc) To keep expressing this difference, introduce TARGET_TYPE := BUILD 
>> (or TARGET_TYPE := TARGET, the default).
>> 
>> The final odd-case was the hack for building hsdis/bin on mingw. This can be 
>> resolved using direct variables to SetupNativeCompilation, instead of first 
>> creating a toolchain.
>> 
>> Doing this refactoring will simplify the SetupNativeCompilation code, and 
>> make it much clearer if we use the C or C++ linker.
>
> Magnus Ihse Bursie has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Rename LANG to LINK_TYPE

Thanks for the run down on the history of the build system! I'm sorry it took 
me a day to respond, I must have missed this in my inbox while going over the 
GitHub activity of the day. Given that the function was meant for the older 
build system, it now seems reasonable to replace it with this newer solution. 
In the worst case scenario, a backout is possible, as was suggested. I would 
have said that LANG is an ok name and that there was no need to rename it to 
LINK_TYPE after the context given and the knowledge that future work was 
planned for it, had I read this earlier though :(

This is also the first time I've ever had an objection to a Pull Request. Feels 
weird, really

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

PR Comment: https://git.openjdk.org/jdk/pull/17986#issuecomment-1965949353

Reply via email to