Repository navigation
Rework java for dropping of javah - #4948
Merged
Merged
Conversation
Now use javac -h - required some pieces moving around. Modernize support for generating JNI headers, since javah command was removed in JDK 10. If no javah is found, the JavaH builder now drives "javac -h" (available since JDK 8) instead, so existing build descriptions keep working. Header files are still declared as build targets, and only classes declaring native methods are declared, matching what javac -h generates, so dependency tracking (including C/C++ #includes of the headers) and incremental rebuilds behave correctly. A single File target (the legacy javah -o mode) has no javac -h equivalent and now raises a clear error when it would be used. The User Guide and tool docs were reworked to present the javac -h mechanism as the normal path, with javah described as the legacy fallback. This change was AI-assisted. Closes SCons#3347 Signed-off-by: Mats Wichmann <mats@linux.com>
Contributor
|
So at least for this purpose we're dropping support for Java < 8? (Though I highly doubt anyone using current SCons is still using Java < 8, we should make it very clear, normally we'd have to do a deprecation cycle, but I think in this case we can skip it) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now use javac -h - required some pieces moving around.
Modernize support for generating JNI headers, since the
javahcommand was removed in JDK 10. If nojavahis found, the JavaH builder now drivesjavac -h(available since JDK 8) instead, so existing build descriptions keep working. Header files are still declared as build targets, and only classes declaring native methods are declared, matching whatjavac -hgenerates, so dependency tracking (including C/C++#includes of the headers) and incremental rebuilds behave correctly. A single File target (the legacyjavah -omode) has nojavac -hequivalent and now raises a clear error when it would be used. The User Guide and tool docs were reworked to present thejavac -hmechanism as the normal path, withjavahdescribed as the legacy fallback.This change was AI-assisted.
Closes #3347
Contributor Checklist:
CHANGES.txtandRELEASE.txt(and read theREADME.rst).