RFR: 8307194: Enhance static-libs-image

Severin Gehwolf sgehwolf at openjdk.org
Wed May 3 17:08:15 UTC 2023


On Wed, 3 May 2023 02:09:22 GMT, Jiangli Zhou <jiangli at openjdk.org> wrote:

> This PR is branched from the makefile changes for https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for handling the JDK/VM static libraries:
> 
> - Create libjvm.a together with other JDK static libraries when building 'static-libs-image' (or 'static-libs-bundles') target, include it in 'images/static-libs/lib';
> - For libjvm.a specifically, exclude operator_new.o;
> - Filter out "external" .o files (those are the .o files included from a different JDK library and needed when creating the .so shared library only) from .a libraries; That's to avoid linker errors due to the duplicate symbols problems from the related .o files;
> - Handle long arguments case for static build in make/common/NativeCompilation.gmk;
> - Address @erikj79's comment in https://github.com/openjdk/jdk/pull/13709#discussion_r1180750185 for LIBJLI_STATIC_EXCLUDE_OBJS;

make/Main.gmk line 1060:

> 1058:   symbols-image: $(LIBS_TARGETS) $(LAUNCHER_TARGETS)
> 1059: 
> 1060:   static-libs-image: hotspot-static-libs $(STATIC_LIBS_TARGETS)

Could we decouple `hotspot-static-libs` from `static-libs-image` somehow, please? `static-libs-image` is used by the `graal-builder-image` target and it would be good if it didn't include hotspot static libs as they are not needed for it.

Would it be sufficient to just use `hotspot-static-libs` directly? Like: `make static-libs-image hotspot-static-libs`? Failing that, could we introduce a new target that produces both?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13768#discussion_r1183974910


More information about the core-libs-dev mailing list