RFR: 8255240: Mobile builds need to exclude some modules [v3]

Johan Vos jvos at openjdk.java.net
Wed Nov 4 09:44:56 UTC 2020


On Wed, 4 Nov 2020 09:34:51 GMT, Tran Khanh Duy <github.com+40482367+khanhduytran0 at openjdk.org> wrote:

>> Also, I'm a bit curious of what other places the X11 headers were needed?
>
> Maybe try add missing includes before exclude?

I'd like to include as much as possible, but if that results in ending up complete implementations between 
#ifndef IOS 
#endif 
statements, I worry that we are moving away from the platform-independent idea as well.

The GLX code is a problem since glx.h has an include to X11/Xlib.h and X11/Xutil.h and it really depends on what is defined there. That header is included in e.g. GLXGraphicsConfig.c (via GLXGraphicsConfig.h)

There is a check on HEADLESS in that file, but it's after the includes. I can move that #ifdef before the includes, but that basically rules out the whole file, and then we are closer to the scenario were everything is included, but all implementations are removed via #ifndef IOS (or #ifndef ANDROID)

I ran into a small build issue, where the -DHEADLESS was not passed to LIBAWT_CFLAGS but that is an easy fix.

-------------

PR: https://git.openjdk.java.net/mobile/pull/10


More information about the mobile-dev mailing list