On Fri, 27 Jun 2025 16:15:57 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:
>> In the static JDK image, a single humongous java executable is generated, >> and no other launcher, such as javac. This makes it impossible to run our >> jtreg tests, which assume these are present. >> >> The solution is fortunately simply: we just need to add a bunch of trivial >> launchers, which are thin wrappers that execute the main java binary, with >> the proper arguments. This will result in the same behavior as the normal >> dynamic launchers, only that we will need to take the detour of launching >> another process instead of calling directly into the JLI library. > > Magnus Ihse Bursie has updated the pull request incrementally with one > additional commit since the last revision: > > Remove problemlisting make/ModuleWrapper.gmk line 82: > 80: TARGETS += $(LAUNCHERS_LIST) > 81: endif > 82: endif I think it would be cleaner if this could be kept in LauncherCommon.gmk and avoid having ModuleWrapper.gmk involved in this. I think it can be done relatively easily. In SetupBuildLauncherBody, instead of constructing the variable `$(MODULE)_INCLUDED_LAUNCHERS`, declare dependencies for `$(LAUNCHER_LIST)`, something like this: $(LAUNCHER_LIST): $$($1) TARGETS += $(LAUNCHER_LIST) Then put the the recipe for `$(LAUNCHER_LIST)` at the end of LauncherCommon.gmk. The $(LAUNCHER_LIST) value will sometimes be added to TARGETS multiple times, but that's ok I think. make/StaticLibs.gmk line 163: > 161: # $2: The launcher name > 162: define SetupRelauncher > 163: $1_$2_LAUNCHER_ARGS_LINE := $$(shell cat > $$(SUPPORT_OUTPUTDIR)/static-native/relaunchers/$1/$2-relauncher-arguments.txt) `$(call ReadFile, ...)` also, double space? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24380#discussion_r2248147264 PR Review Comment: https://git.openjdk.org/jdk/pull/24380#discussion_r2248474424