RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v20]
Severin Gehwolf
sgehwolf at openjdk.org
Thu Apr 4 12:10:15 UTC 2024
On Thu, 14 Mar 2024 17:46:19 GMT, Erik Joelsson <erikj at openjdk.org> wrote:
>> Severin Gehwolf has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix comment in autoconf file
>
> make/Images.gmk line 126:
>
>> 124: RL_BUILD_MODULE_NAME := jdk.unsupported_jlink_runtime
>> 125: RL_CREATE_PLUGIN_MOD_OUTPUT := $(SUPPORT_OUTPUTDIR)/$(RL_BUILD_MODULE_NAME)
>> 126: JDK_RUN_TIME_IMAGE_SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/runtime-link-support
>
> Suggestion:
>
> JDK_RUNTIME_IMAGE_SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/runtime-link-support
>
> or just inline it as it's only used in one location.
Obsolete now.
> make/Images.gmk line 132:
>
>> 130: JLINK_RUNTIME_CREATE_ARG += -J--add-exports=java.base/jdk.internal.jimage=$(RL_BUILD_MODULE_NAME)
>> 131: JLINK_RUNTIME_CREATE_ARG += -J--add-exports=jdk.jlink/jdk.tools.jlink.internal=$(RL_BUILD_MODULE_NAME)
>> 132: JLINK_RUNTIME_CREATE_ARG += --create-linkable-runtime jimage=$(JDK_LINK_OUTPUT_DIR)/lib/modules:module-path=$(IMAGES_OUTPUTDIR)/jmods
>
> I would suggest using recommendation 17 from the [style guideline](https://openjdk.org/groups/build/doc/code-conventions.html) here.
> Suggestion:
>
> JLINK_RUNTIME_CREATE_ARG := \
> -J--module-path=$(RL_CREATE_PLUGIN_MOD_OUTPUT) \
> -J--add-exports=java.base/jdk.internal.module=$(RL_BUILD_MODULE_NAME) \
> -J--add-exports=java.base/jdk.internal.jimage=$(RL_BUILD_MODULE_NAME) \
> -J--add-exports=jdk.jlink/jdk.tools.jlink.internal=$(RL_BUILD_MODULE_NAME) \
> --create-linkable-runtime jimage=$(JDK_LINK_OUTPUT_DIR)/lib/modules:module-path=$(IMAGES_OUTPUTDIR)/jmods \
> #
>
> or just inline as it's only used in one location.
No longer applicable.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14787#discussion_r1551541291
PR Review Comment: https://git.openjdk.org/jdk/pull/14787#discussion_r1551542046
More information about the core-libs-dev
mailing list