RFR: 8333795: [mobile] allow building jdk native libs for ios/android

Magnus Ihse Bursie ihse at openjdk.org
Fri Jun 14 16:16:19 UTC 2024


On Fri, 14 Jun 2024 15:36:43 GMT, Johan Vos <jvos at openjdk.org> wrote:

>> src/java.base/macosx/native/libjli/java_md_macosx.m line 279:
>> 
>>> 277: 
>>> 278: #ifdef __IOS__
>>> 279: static jboolean awtLoaded = 0;
>> 
>> How come this change is needed? Why do `BOOL` not work on iOS? Or contrary, could `jboolean` work on macOS as well?
>
> BOOL is different on iOS versus macOS.
> mac code should work with jboolean.
> Looking at it again now, I don't see where `awtLoaded` is used at all, so that could just go away unless I'm missing something?

I agree, it seems unused. I can only find a read in `JLI_NotifyAWTLoaded` but that is never called. 

I guess we should file a bug on mainline to remove this code. Question is if we should keep this hack in mobile for the time being. I guess we can do that, if it is needed to make it compile. A fix in mainline will likely trigger a manual merge later on.

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

PR Review Comment: https://git.openjdk.org/mobile/pull/26#discussion_r1640045566


More information about the mobile-dev mailing list