On Tue, 26 Nov 2024 15:32:43 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:
>> make/autoconf/buildjdk-spec.gmk.template line 80: >> >>> 78: CXXFLAGS_JDKEXE := @OPENJDK_BUILD_CXXFLAGS_JDKEXE@ >>> 79: LDFLAGS_JDKEXE := @OPENJDK_BUILD_LDFLAGS_JDKEXE@ >>> 80: LDFLAGS_STATIC_JDK := @OPENJDK_BUILD_LDFLAGS_STATIC_JDK@ >> >> Do we really expect to ever build a static-jdk as buildjdk? > > Not really, no. I created this out of symmetry reasons. Do you want me to > remove it? Removed. >> make/common/JdkNativeCompilation.gmk line 313: >> >>> 311: # created libraries, and is read by ModuleWrapper. >>> 312: ifneq ($$($1_EXCLUDE_FROM_STATIC_LIBS), true) >>> 313: $$(MODULE)_JDK_LIBS += $$($1_NAME) >> >> This variable is used to track libraries that should be included in static >> libs. Perhaps the name should include the word "static" to make this >> clearer? Otherwise it doesn't make sense to exclude libraries like this from >> this list. > > I think it's more the name EXCLUDE_FROM_STATIC_LIBS that is bad. What I am > really trying to express here is whether a library is supposed to be used by > the Java classes in this module, or if it is provided as a special library > for external parties to link with. > > Like you said about the windowsaccessbridge stuff above. These too should be > flagged as "do not implement necessary native functionality for the java > classes in the module". > > Maybe call it ONLY_EXPORTED? NOT_INTERNALLY_USED? Or maybe turn the boolean > the other way around and call it USED_BY_MODULE, and set it fo `false` for > those special cases? I renamed `EXCLUDE_FROM_STATIC_LIBS` to `ONLY_EXPORTED`, `$(MODULE)_JDK_LIBS` to `$(MODULE)_INCLUDED_LIBS` and `module-libs.txt` to `module-included-libs.txt`. I hope this makes the purpose clearer and the usage more consistent. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20837#discussion_r1858942492 PR Review Comment: https://git.openjdk.org/jdk/pull/20837#discussion_r1858940422