RFR: 8307194: Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v9]

Erik Joelsson erikj at openjdk.org
Tue May 9 22:17:18 UTC 2023


On Tue, 9 May 2023 21:46:42 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/hotspot static libraries:
>> 
>> - Introduce new make target(s) for creating image/bundle containing hotspot libjvm.a and JDK static libraries
>> 
>> - 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 JDK .a libraries; That's to avoid linker failures caused by duplicate symbols
>>   - For libjli.a: Not include inflate.o inftrees.o inffast.o zadler32.o zcrc32.o zutil.o (compiled from zlib sources) if zlib is built as JDK bundled
>>  - For libawt_xawt.a and libawt_head.a: Not include systemScale.o, since it's provided in libawt.a
>>  
>> - 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
>
> Jiangli Zhou has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix whitspace errors.

I think you also need to make a change to `GraalBuilderImage.gmk` and the target in `Main.gmk` that calls it.

Otherwise this looks pretty good to me.

make/Main.gmk line 1281:

> 1279: all-bundles: product-bundles test-bundles docs-bundles static-libs-bundles
> 1280: 
> 1281: ALL_TARGETS += buildtools hotspot hotspot-libs hotspot-static-libs hotspot-gensrc gensrc gendata \

Can you add a newline to try to keep line length in check here. No need to reformat the whole block, just don't let random lines shoot way over 80.

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

PR Review: https://git.openjdk.org/jdk/pull/13768#pullrequestreview-1419519027
PR Review Comment: https://git.openjdk.org/jdk/pull/13768#discussion_r1189176422


More information about the core-libs-dev mailing list