On Wed, 5 Nov 2025 17:41:44 GMT, Henry Jen <[email protected]> wrote:
> This PR include build changes from @magicus and jlink change to verify the > build signature. > > Tested with local builds for MacOS and Linux as below shows that cross > linking with same build is working while linking with different build failed > with error message. > > ❯ export > JAVA_HOME=./build/macosx-x86_64-server-fastdebug/images/jdk-bundle/jdk-26.jdk/Contents/Home > > > > ❯ java --version > openjdk 26-internal 2026-03-17 > OpenJDK Runtime Environment (fastdebug build > 26-internal-adhoc.hjen.JDK-8347831) > OpenJDK 64-Bit Server VM (fastdebug build 26-internal-adhoc.hjen.JDK-8347831, > mixed mode, sharing) > > > > ❯ jlink --version > > 26-internal > > > > ❯ jlink --module-path ./build/linux-x86_64-server-release/images/jdk/jmods > --add-modules java.base --output linux > > > > > > ❯ jlink --add-modules java.base --output macos > > ❯ jlink --module-path ~/linux/jdk-25.0.1/jmods --add-modules java.base > --output linux25 > Error: jlink build N/A-26-internal-adhoc.hjen.JDK-8347831-2026-03-17 does not > match target java.base build N/A > > > > ❯ jlink --module-path > /Library/Java/JavaVirtualMachines/jdk-25.jdk/Contents/Home/jmods > --add-modules java.base --output macos25 > Error: jlink build N/A-26-internal-adhoc.hjen.JDK-8347831-2026-03-17 does not > match target java.base build N/A I'm not thrilled about the code duplication between Gensrc.gmk in java.base and and jdk.jlink. I think this should be extracted out into a common file in some way. Having 2 copies of the template file also seems suboptimal. make/modules/java.base/Gensrc.gmk line 129: > 127: RELEASE_FILE_VARDEPS := $(COMPANY_NAME) $(VERSION_STRING) $(VERSION_DATE) > 128: RELEASE_FILE_VARDEPS_FILE := $(call DependOnVariable, > RELEASE_FILE_VARDEPS, \ > 129: $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/jlink_release_txt.vardeps) Continuation indentation should be 4 spaces (see https://openjdk.org/groups/build/doc/code-conventions.html). make/modules/java.base/Gensrc.gmk line 134: > 132: SOURCE_FILES := $(RELEASE_FILE_TEMPLATE), \ > 133: OUTPUT_FILE := $(RELEASE_FILE_TARGET), \ > 134: REPLACEMENTS := \ Continuation indentation 4 spaces. make/modules/java.base/Gensrc.gmk line 140: > 138: )) > 139: > 140: $(OUTPUT_FILE): $(RELEASE_FILE_VARDEPS_FILE) There is no variable `OUTPUT_FILE` defined. I think this should be `$(BUILD_RELEASE_FILE)`. ------------- PR Review: https://git.openjdk.org/jdk/pull/28155#pullrequestreview-3423620882 PR Review Comment: https://git.openjdk.org/jdk/pull/28155#discussion_r2495596212 PR Review Comment: https://git.openjdk.org/jdk/pull/28155#discussion_r2495596793 PR Review Comment: https://git.openjdk.org/jdk/pull/28155#discussion_r2495599114
