From ihse at openjdk.org Mon Jun 3 10:05:25 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Mon, 3 Jun 2024 10:05:25 GMT Subject: RFR: 8333357: revert current mobile changes In-Reply-To: References: Message-ID: On Fri, 31 May 2024 13:34:03 GMT, Johan Vos wrote: > Revert mobile-specific changes that are in openjdk/mobile but not inpenjdk/jdk > This allows us to add new, clean commits that are in line with the recent changes in jdk and the requirements for ios/android ports. Marked as reviewed by ihse (Reviewer). ------------- PR Review: https://git.openjdk.org/mobile/pull/25#pullrequestreview-2093376212 From jvos at openjdk.org Mon Jun 3 10:05:25 2024 From: jvos at openjdk.org (Johan Vos) Date: Mon, 3 Jun 2024 10:05:25 GMT Subject: Integrated: 8333357: revert current mobile changes In-Reply-To: References: Message-ID: On Fri, 31 May 2024 13:34:03 GMT, Johan Vos wrote: > Revert mobile-specific changes that are in openjdk/mobile but not inpenjdk/jdk > This allows us to add new, clean commits that are in line with the recent changes in jdk and the requirements for ios/android ports. This pull request has now been integrated. Changeset: 4fa8706b Author: Johan Vos URL: https://git.openjdk.org/mobile/commit/4fa8706bf011e290051de62fa7285fb9772b817a Stats: 168 lines in 15 files changed: 0 ins; 154 del; 14 mod 8333357: revert current mobile changes Reviewed-by: ihse ------------- PR: https://git.openjdk.org/mobile/pull/25 From jvos at openjdk.org Sat Jun 8 08:34:40 2024 From: jvos at openjdk.org (Johan Vos) Date: Sat, 8 Jun 2024 08:34:40 GMT Subject: RFR: 8333795: [mobile] allow building jdk native libs for ios/android Message-ID: This PR contains the changes that are needed to build the native JDK class libraries for ios/android. After a successful configuration, invoking `make static-libs` should produces static libs for the JDK classes. ------------- Commit messages: - Fix whitespace - Allow building static JDK libs for ios/android Changes: https://git.openjdk.org/mobile/pull/26/files Webrev: https://webrevs.openjdk.org/?repo=mobile&pr=26&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8333795 Stats: 137 lines in 32 files changed: 115 ins; 0 del; 22 mod Patch: https://git.openjdk.org/mobile/pull/26.diff Fetch: git fetch https://git.openjdk.org/mobile.git pull/26/head:pull/26 PR: https://git.openjdk.org/mobile/pull/26 From jvos at openjdk.org Sat Jun 8 10:07:25 2024 From: jvos at openjdk.org (Johan Vos) Date: Sat, 8 Jun 2024 10:07:25 GMT Subject: RFR: 8255240: Mobile builds need to exclude some modules [v4] In-Reply-To: References: Message-ID: On Sun, 14 Apr 2024 07:09:17 GMT, Johan Vos wrote: >> This PR enables to build the static libs for ios/android for the native code in most of the modules. >> It also adds GA scripts to build those libs on Android and iOS. >> Note that building hotspot is disabled by this PR. > > Johan Vos has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains ten commits: > > - Merge branch 'master' into staticlibs > - re-enable gensrc for X11 on Android > fix whitespace issue > - Process reviewer comments > - Merge branch 'master' into staticlibs > - When building for ios, deal with non-supported @objectfilenames (similar to macos and aix) > - Merge branch 'master' into minimal-android-23 > Fix conflict related to major changes in NativeCompilation.gmk > - Add android workflow (#2) > > * Add android build > > * fix env variable use > > * fix condition > > * update conf and build for android > > * add config name > > * remove build jdk > > * update id > > * fix command > > * add ls to debug > > * fix build command > > * update conf name > > * update directory name > > * remove ${{ }} to fix condition > > * do not remove bundle for android > > * add debug > > * add debug > > * do not build debug > > * s/x64/aarch64 > > * add debug logs > > * fix condition > > * create only release > > * build on push > > * add ios build > > * fix platform name > > * download cups from source > > * fix command > > * skip running make for product-bundles and test-bundles > > * update upload to support ios static > - Add required ios changes for building static libs. > Add sample configure script for ios > - Changes required to build static libs for Android with JDK 23-ea I plan to close this, as the same issue is addressed in #26 (which is based on the latest openjdk/head) ------------- PR Comment: https://git.openjdk.org/mobile/pull/20#issuecomment-2155944933 From ihse at openjdk.org Fri Jun 14 12:06:17 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Fri, 14 Jun 2024 12:06:17 GMT Subject: RFR: 8333795: [mobile] allow building jdk native libs for ios/android In-Reply-To: References: Message-ID: On Fri, 7 Jun 2024 13:09:26 GMT, Johan Vos wrote: > This PR contains the changes that are needed to build the native JDK class libraries for ios/android. > After a successful configuration, invoking > `make static-libs` > should produces static libs for the JDK classes. The patch looks overall good. I left a couple of questions that I'd like to see answered before integration. make/modules/java.desktop/Lib.gmk line 38: > 36: # Create the AWT/2D libraries > 37: > 38: ifeq ($(call isTargetOs, android ios), false) This is acceptable for now, but I think we should try to find a more elegant way to resolve this. src/hotspot/share/utilities/elfFile.hpp line 28: > 26: #define SHARE_UTILITIES_ELFFILE_HPP > 27: > 28: #if !defined(_WINDOWS) && (!defined(__APPLE__) || defined(__BIOS__)) && !defined(_AIX) Is this really correct? 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? ------------- Marked as reviewed by ihse (Reviewer). PR Review: https://git.openjdk.org/mobile/pull/26#pullrequestreview-2118221743 PR Review Comment: https://git.openjdk.org/mobile/pull/26#discussion_r1639718361 PR Review Comment: https://git.openjdk.org/mobile/pull/26#discussion_r1639718755 PR Review Comment: https://git.openjdk.org/mobile/pull/26#discussion_r1639720155 From jvos at openjdk.org Fri Jun 14 15:39:36 2024 From: jvos at openjdk.org (Johan Vos) Date: Fri, 14 Jun 2024 15:39:36 GMT Subject: RFR: 8333795: [mobile] allow building jdk native libs for ios/android In-Reply-To: References: Message-ID: <8QHcfA15Rvmpo4olwZz7A-CSKDzsAKVfVVD8jhC4Vnc=.937c3621-88d2-4596-ba88-a4be57c91a94@github.com> On Fri, 14 Jun 2024 12:03:05 GMT, Magnus Ihse Bursie wrote: >> This PR contains the changes that are needed to build the native JDK class libraries for ios/android. >> After a successful configuration, invoking >> `make static-libs` >> should produces static libs for the JDK classes. > > 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? ------------- PR Review Comment: https://git.openjdk.org/mobile/pull/26#discussion_r1640005295 From ihse at openjdk.org Fri Jun 14 16:16:19 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Fri, 14 Jun 2024 16:16:19 GMT Subject: RFR: 8333795: [mobile] allow building jdk native libs for ios/android In-Reply-To: <8QHcfA15Rvmpo4olwZz7A-CSKDzsAKVfVVD8jhC4Vnc=.937c3621-88d2-4596-ba88-a4be57c91a94@github.com> References: <8QHcfA15Rvmpo4olwZz7A-CSKDzsAKVfVVD8jhC4Vnc=.937c3621-88d2-4596-ba88-a4be57c91a94@github.com> Message-ID: On Fri, 14 Jun 2024 15:36:43 GMT, Johan Vos 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 From jvos at openjdk.org Fri Jun 14 20:08:30 2024 From: jvos at openjdk.org (Johan Vos) Date: Fri, 14 Jun 2024 20:08:30 GMT Subject: RFR: 8333795: [mobile] allow building jdk native libs for ios/android [v2] In-Reply-To: References: Message-ID: > This PR contains the changes that are needed to build the native JDK class libraries for ios/android. > After a successful configuration, invoking > `make static-libs` > should produces static libs for the JDK classes. Johan Vos has updated the pull request incrementally with one additional commit since the last revision: Fix typo ------------- Changes: - all: https://git.openjdk.org/mobile/pull/26/files - new: https://git.openjdk.org/mobile/pull/26/files/f94a8777..6c67b5d7 Webrevs: - full: https://webrevs.openjdk.org/?repo=mobile&pr=26&range=01 - incr: https://webrevs.openjdk.org/?repo=mobile&pr=26&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/mobile/pull/26.diff Fetch: git fetch https://git.openjdk.org/mobile.git pull/26/head:pull/26 PR: https://git.openjdk.org/mobile/pull/26 From jvos at openjdk.org Fri Jun 14 20:08:31 2024 From: jvos at openjdk.org (Johan Vos) Date: Fri, 14 Jun 2024 20:08:31 GMT Subject: RFR: 8333795: [mobile] allow building jdk native libs for ios/android [v2] In-Reply-To: References: Message-ID: On Fri, 14 Jun 2024 12:01:16 GMT, Magnus Ihse Bursie wrote: >> Johan Vos has updated the pull request incrementally with one additional commit since the last revision: >> >> Fix typo > > make/modules/java.desktop/Lib.gmk line 38: > >> 36: # Create the AWT/2D libraries >> 37: >> 38: ifeq ($(call isTargetOs, android ios), false) > > This is acceptable for now, but I think we should try to find a more elegant way to resolve this. True. It's a complex issue and discussion though, but I agree we need to find an elegant way as a follow-up. > src/hotspot/share/utilities/elfFile.hpp line 28: > >> 26: #define SHARE_UTILITIES_ELFFILE_HPP >> 27: >> 28: #if !defined(_WINDOWS) && (!defined(__APPLE__) || defined(__BIOS__)) && !defined(_AIX) > > Is this really correct? No, that's a typo indeed. With `make static-libs`, this code is not yet included but it is needed in the next step (when we use `make static-libs-image` which will also build the VM. I fixed this. ------------- PR Review Comment: https://git.openjdk.org/mobile/pull/26#discussion_r1640292964 PR Review Comment: https://git.openjdk.org/mobile/pull/26#discussion_r1640292321 From jvos at openjdk.org Fri Jun 14 20:08:31 2024 From: jvos at openjdk.org (Johan Vos) Date: Fri, 14 Jun 2024 20:08:31 GMT Subject: RFR: 8333795: [mobile] allow building jdk native libs for ios/android [v2] In-Reply-To: References: <8QHcfA15Rvmpo4olwZz7A-CSKDzsAKVfVVD8jhC4Vnc=.937c3621-88d2-4596-ba88-a4be57c91a94@github.com> Message-ID: On Fri, 14 Jun 2024 16:13:57 GMT, Magnus Ihse Bursie wrote: >> 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. Right, the skara bot will probably fail to auto-merge the upstream fix (once it's integrated), but it will auto-create a PR that requires a small manual commit, and then the automated process continues -- this happened in the past, and it works very nice. ------------- PR Review Comment: https://git.openjdk.org/mobile/pull/26#discussion_r1640294194 From ihse at openjdk.org Fri Jun 14 21:03:20 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Fri, 14 Jun 2024 21:03:20 GMT Subject: RFR: 8333795: [mobile] allow building jdk native libs for ios/android [v2] In-Reply-To: References: Message-ID: On Fri, 14 Jun 2024 20:08:30 GMT, Johan Vos wrote: >> This PR contains the changes that are needed to build the native JDK class libraries for ios/android. >> After a successful configuration, invoking >> `make static-libs` >> should produces static libs for the JDK classes. > > Johan Vos has updated the pull request incrementally with one additional commit since the last revision: > > Fix typo I think this looks fine now. ------------- Marked as reviewed by ihse (Reviewer). PR Review: https://git.openjdk.org/mobile/pull/26#pullrequestreview-2119285608 From ihse at openjdk.org Fri Jun 14 21:03:22 2024 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Fri, 14 Jun 2024 21:03:22 GMT Subject: RFR: 8333795: [mobile] allow building jdk native libs for ios/android [v2] In-Reply-To: References: Message-ID: On Fri, 14 Jun 2024 20:03:11 GMT, Johan Vos wrote: >> src/hotspot/share/utilities/elfFile.hpp line 28: >> >>> 26: #define SHARE_UTILITIES_ELFFILE_HPP >>> 27: >>> 28: #if !defined(_WINDOWS) && (!defined(__APPLE__) || defined(__BIOS__)) && !defined(_AIX) >> >> Is this really correct? > > No, that's a typo indeed. > With `make static-libs`, this code is not yet included but it is needed in the next step (when we use `make static-libs-image` which will also build the VM. > I fixed this. That explains why it was not discovered. Thanks, I was just wondering that. ------------- PR Review Comment: https://git.openjdk.org/mobile/pull/26#discussion_r1640351907 From jvos at openjdk.org Sat Jun 15 08:01:33 2024 From: jvos at openjdk.org (Johan Vos) Date: Sat, 15 Jun 2024 08:01:33 GMT Subject: Integrated: 8333795: [mobile] allow building jdk native libs for ios/android In-Reply-To: References: Message-ID: On Fri, 7 Jun 2024 13:09:26 GMT, Johan Vos wrote: > This PR contains the changes that are needed to build the native JDK class libraries for ios/android. > After a successful configuration, invoking > `make static-libs` > should produces static libs for the JDK classes. This pull request has now been integrated. Changeset: deb4256a Author: Johan Vos URL: https://git.openjdk.org/mobile/commit/deb4256a4d9cad7475a8eecad8860135bbdfd483 Stats: 137 lines in 32 files changed: 115 ins; 0 del; 22 mod 8333795: [mobile] allow building jdk native libs for ios/android Reviewed-by: ihse ------------- PR: https://git.openjdk.org/mobile/pull/26 From jvos at openjdk.org Sat Jun 15 08:02:31 2024 From: jvos at openjdk.org (Johan Vos) Date: Sat, 15 Jun 2024 08:02:31 GMT Subject: RFR: 8255240: Mobile builds need to exclude some modules [v4] In-Reply-To: References: Message-ID: On Sun, 14 Apr 2024 07:09:17 GMT, Johan Vos wrote: >> This PR enables to build the static libs for ios/android for the native code in most of the modules. >> It also adds GA scripts to build those libs on Android and iOS. >> Note that building hotspot is disabled by this PR. > > Johan Vos has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains ten commits: > > - Merge branch 'master' into staticlibs > - re-enable gensrc for X11 on Android > fix whitespace issue > - Process reviewer comments > - Merge branch 'master' into staticlibs > - When building for ios, deal with non-supported @objectfilenames (similar to macos and aix) > - Merge branch 'master' into minimal-android-23 > Fix conflict related to major changes in NativeCompilation.gmk > - Add android workflow (#2) > > * Add android build > > * fix env variable use > > * fix condition > > * update conf and build for android > > * add config name > > * remove build jdk > > * update id > > * fix command > > * add ls to debug > > * fix build command > > * update conf name > > * update directory name > > * remove ${{ }} to fix condition > > * do not remove bundle for android > > * add debug > > * add debug > > * do not build debug > > * s/x64/aarch64 > > * add debug logs > > * fix condition > > * create only release > > * build on push > > * add ios build > > * fix platform name > > * download cups from source > > * fix command > > * skip running make for product-bundles and test-bundles > > * update upload to support ios static > - Add required ios changes for building static libs. > Add sample configure script for ios > - Changes required to build static libs for Android with JDK 23-ea obsolete after integrating #26 ------------- PR Comment: https://git.openjdk.org/mobile/pull/20#issuecomment-2169193543 From jvos at openjdk.org Sat Jun 15 08:02:31 2024 From: jvos at openjdk.org (Johan Vos) Date: Sat, 15 Jun 2024 08:02:31 GMT Subject: Withdrawn: 8255240: Mobile builds need to exclude some modules In-Reply-To: References: Message-ID: On Sat, 23 Mar 2024 16:30:46 GMT, Johan Vos wrote: > This PR enables to build the static libs for ios/android for the native code in most of the modules. > It also adds GA scripts to build those libs on Android and iOS. > Note that building hotspot is disabled by this PR. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/mobile/pull/20