RFR: 8255240: Mobile builds need to exclude some modules [v3]
Bob Vandette
bobv at openjdk.java.net
Sat Oct 24 13:18:40 UTC 2020
On Fri, 23 Oct 2020 12:06:48 GMT, Johan Vos <jvos at openjdk.org> wrote:
>> exclude some modules that are not relevant on Mobile.
>> Fix for JDK-8255240
>
> Johan Vos has updated the pull request incrementally with one additional commit since the last revision:
>
> fix fi/endif issue
make/modules/java.desktop/Lib.gmk line 38:
> 36:
> 37: ifeq ($(call isTargetOs, android ios), false)
> 38: include lib/Awt2dLibraries.gmk
This change seems too extreme. You'll have access to the desktop module but any use of the java code in this module will fail since libawt will be missing. The real fix is to configure the sources and makefiles so the entire code path java.desktop -> native libraries is available but only for the headless toolkit. The libawt_lwawt should not be included. This may be difficult since the fontmanager is dependent this native code.
If this is too difficult, you should just go back and not support the java.desktop module like you had in your first PR version. Although, every time you add a change like this which moves away from full JRE JCK compatibility, you make it more difficult to upstream these changes.
make/common/Modules.gmk line 235:
> 233:
> 234: ################################################################################
> 235: # Filter out specific modules for mobile platforms
Is there a reason why you want to excluded these modules? I would think that it might be nice to be able to manage a mobile application remotely. If these modules are incompatible with native-image, then just remove them from your built images when you create a GraalVM builder image.
-------------
PR: https://git.openjdk.java.net/mobile/pull/10
More information about the mobile-dev
mailing list