Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Enable build support for JEP 493 enabled base JDKs #287

Closed

Conversation

jerboaa
Copy link
Contributor

@jerboaa jerboaa commented Nov 21, 2024

JEP 493-enabled JDKs won't have a 'jmods' directory by default. For builds with option --no-jlinking the replacement of base JDK-provided non-upgradable modules is not required, nor desired. Allow for builds with no JMODs in that case by checking for this option being in use and if so upgrade the module path when compiling module-info.java files.

Tested with the following on a based JDK without jmods folder:

$ mx --primary-suite substratevm --no-jlinking --native-images=lib:native-image-agent,lib:native-image-diagnostics-agent --components=ni build

Closes #286

JEP 493-enabled JDKs won't have a 'jmods' directory by
default. For builds with option --no-jlinking the replacement
of base JDK-provided non-upgradable modules is not required,
nor desired. Allow for builds with no JMODs in that case by
checking for this option being in use and if so upgrade the
module path when compiling module-info.java files.
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 21, 2024
@jerboaa
Copy link
Contributor Author

jerboaa commented Nov 26, 2024

@dougxc Could you please take another look? Would something like that be acceptable? Thanks!

jerboaa added a commit to jerboaa/graal that referenced this pull request Nov 26, 2024
With JEP 493, part of JDK 24, it's possible to have JDK builds without
the `jmods` folder. Currently substratevm builds assume `jmods` are
always present. This patch adds an extension to mx so as to produce
custom javac args when specific substratevm dependencies get compiled.

All of this is activated only when `--no-jlinking` option is being
used.

This patch depends on (which adds the needed abstractions to mx):
graalvm/mx#287
jerboaa added a commit to jerboaa/graal that referenced this pull request Nov 26, 2024
With JEP 493, part of JDK 24, it's possible to have JDK builds without
the `jmods` folder. Currently substratevm builds assume `jmods` are
always present. This patch adds an extension to mx so as to produce
custom javac args when specific substratevm dependencies get compiled.

All of this is activated only when `--no-jlinking` option is being
used.

This patch depends on (which adds the needed abstractions to mx):
graalvm/mx#287
Copy link
Member

@dougxc dougxc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I'll integrate this.

@jerboaa
Copy link
Contributor Author

jerboaa commented Nov 27, 2024

Looks good. I'll integrate this.

Thank you!

@jerboaa
Copy link
Contributor Author

jerboaa commented Nov 27, 2024

@dougxc Once integrated we'd also need a tagged mx version to pick it up in graal accordingly. Thanks!

@dougxc
Copy link
Member

dougxc commented Nov 27, 2024

This merged as e262358.

@dougxc dougxc closed this Nov 27, 2024
@jerboaa
Copy link
Contributor Author

jerboaa commented Nov 27, 2024

Thank you!

jerboaa added a commit to jerboaa/graal that referenced this pull request Nov 28, 2024
With JEP 493, part of JDK 24, it's possible to have JDK builds without
the `jmods` folder. Currently substratevm builds assume `jmods` are
always present. This patch adds an extension to mx so as to produce
custom javac args when specific substratevm dependencies get compiled.

All of this is activated only when `--no-jlinking` option is being
used.

This patch depends on (which adds the needed abstractions to mx):
graalvm/mx#287
graalvmbot pushed a commit to oracle/graal that referenced this pull request Dec 2, 2024
With JEP 493, part of JDK 24, it's possible to have JDK builds without
the `jmods` folder. Currently substratevm builds assume `jmods` are
always present. This patch adds an extension to mx so as to produce
custom javac args when specific substratevm dependencies get compiled.

All of this is activated only when `--no-jlinking` option is being
used.

This patch depends on (which adds the needed abstractions to mx):
graalvm/mx#287
# for free to join this conversation on GitHub. Already have an account? # 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.

mx assumes base JDK includes jmods
2 participants