RFR: 8255240: Mobile builds need to exclude some modules [v3]
Magnus Ihse Bursie
ihse at openjdk.java.net
Wed Nov 4 09:32:01 UTC 2020
On Wed, 4 Nov 2020 09:28:24 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:
>> Thanks for the suggestion.
>> `NEEDS_LIB_X11` was already false for ios/android (same file, in the if clause) but there were a few places where an X11 header was still required. I could easily fix those, but there are more issues when building libawt.a. For example, font.c relies on fontconfig/fontconfig.h which we don't have on android.
>> Actually, the whole font handling is something that is already done in JavaFX (in OpenJFX), and for Android we leverage freetype.
>> I'm a bit puzzled, as I think it would be a huge overkill to somehow port the font code from OpenJDK to android, but never using it as it is already done in OpenJFX.
>> Another area is the dependency on X11 in the java2d/opengl/J2D_GL files.
>>
>> To me, it seems the main issue is that I don't think this code belongs in the core of OpenJDK.
>
> Fine. If you don't need or want java.desktop, then I suggest you exclude that module for iOS/Android.
>
> I still agree with Bob that keeping java.desktop but not building the native libs sounds problematic, since it will make stuff fail surprisingly at runtime.
>
> If you need part, but not all, of java.desktop, then for this patch I don't really care, but if so, that is something that needs to be discussed seriously on how to handle before we can start thinking about upstreaming mobile into mainline.
Also, I'm a bit curious of what other places the X11 headers were needed?
-------------
PR: https://git.openjdk.java.net/mobile/pull/10
More information about the mobile-dev
mailing list