RFR: 8331020: Assign LANG to C++ for Windows code that uses C++

Julian Waters jwaters at openjdk.org
Tue Apr 30 13:53:08 UTC 2024


On Tue, 30 Apr 2024 12:32:09 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

>> Currently, on Windows LANG is not assigned to C++ for some code that does use C++. This just works because link.exe does not bother about what kind of code it is currently linking. gcc however, does. It doesn't hurt to assign LANG to C++ as a formality in such cases, which this changeset does. This also renames LINK_TYPE to LANG, which the original change to remove the TOOLCHAIN parameter used to do
>
> make/modules/java.desktop/lib/AwtLibraries.gmk line 102:
> 
>> 100: $(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \
>> 101:     NAME := awt, \
>> 102:     LANG := $(if $(filter $(OPENJDK_TARGET_OS), windows), C++, C), \
> 
> No, this is not okay. You need to do this as for the LIBJSOUND_LINK_TYPE above. The same goes for the one below, too.

Oh, I'm surprised! I thought that you'd prefer the more lambda-like approach. I guess the other way of LIBAWT_LINK_TYPE works too in that case

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18927#discussion_r1584867458


More information about the build-dev mailing list