Skip to content

[GR-73281] [GR-73404] Avoid redundant --add-modules arguments getting passed to the builder.#12989

Merged
graalvmbot merged 5 commits intomasterfrom
paw/GR-73281
Feb 17, 2026
Merged

[GR-73281] [GR-73404] Avoid redundant --add-modules arguments getting passed to the builder.#12989
graalvmbot merged 5 commits intomasterfrom
paw/GR-73281

Conversation

@graalvmbot
Copy link
Collaborator

@graalvmbot graalvmbot commented Feb 17, 2026

The implementation of GR-49845 introduced an issue with adding more --add-modules arguments to the builder then what we actually need. This should be fixed so that understanding the --add-modules arguments that are getting passed to the builder is easier.

To test this native-image-module-tests is extended to depend on module jdk.dynalink.

Without the fix implemented here the builder VM would get

--add-modules=java.rmi,jdk.jdi,java.xml,java.datatransfer,org.graalvm.truffle.compiler,java.desktop,org.graalvm.polyglot,org.graalvm.nativeimage,java.security.sasl,jdk.zipfs,org.graalvm.nativebridge,java.base,org.graalvm.truffle,jdk.management.agent,com.oracle.graal.graal_enterprise,org.graalvm.word,org.graalvm.truffle.runtime,java.sql.rowset,jdk.unsupported,jdk.jlink,java.security.jgss,java.compiler,jdk.graal.compiler,jdk.dynalink,org.graalvm.collections,java.sql,java.logging,java.xml.crypto,java.transaction.xa,jdk.jfr,jdk.internal.vm.ci,jdk.internal.md,java.naming,jdk.internal.ed,java.prefs,java.net.http,jdk.compiler,jdk.internal.opt,jdk.attach,jdk.internal.le,java.management,jdk.jdwp.agent,jdk.internal.jvmstat,java.instrument,org.graalvm.jniutils,jdk.management,java.scripting,jdk.jdeps,java.management.rmi

Out of those modules only the jdk.dynalink is needed because the other modules are dependencies that the builder itself already requires. With the fix we now only have --add-modules=jdk.dynalink added to the builder args.

A positive side effect of this cleanup is that the number of calls to NativeImageClassLoaderSupport.LoadClassHandler#initModule is greatly reduced.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Feb 17, 2026
@graalvmbot graalvmbot merged commit 43a3b52 into master Feb 17, 2026
13 checks passed
@graalvmbot graalvmbot deleted the paw/GR-73281 branch February 17, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants