On Mon, 21 Mar 2022 17:16:49 GMT, Erik Joelsson <er...@openjdk.org> wrote:
>> This PR contains the API and implementation changes for JEP-424 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] - https://openjdk.java.net/jeps/424 > > make/modules/java.base/Lib.gmk line 217: > >> 215: CXXFLAGS := $(CXXFLAGS_JDKLIB), \ >> 216: LDFLAGS := $(LDFLAGS_JDKLIB) -Wl$(COMMA)--no-as-needed, \ >> 217: LIBS := $(LIBCXX) -lc -lm -ldl, \ > > Instead of repeating this whole macro call for both Linux and non Linux, you > can use parameters of the form LDFLAGS_linux and LIBS_linux to add the Linux > specific flags. Something like this: > > > LDFLAGS := $(LDFLAGS_JDKLIB), \ > LDFLAGS_linux := -Wl$(COMMA)--no-as-needed, \ > > > For the NAME field, there is no such support, so the way we usually do that > is through a variable and conditionals before the macro call. What's the > reason to have a different lib name on Windows? If they were the same, and > the source file in windows/native/... had the same name, it would just > automatically override in the build. > > I realize now that this is just moved code from jdk.incubator.foreign, and > this patch is probably big enough as it is so no need to refactor the build > logic at the same time. Good points - there is really no need AFAIK for the lib name to be different. I'll do few experiments. ------------- PR: https://git.openjdk.java.net/jdk/pull/7888