labs-openjdk-11 icon indicating copy to clipboard operation
labs-openjdk-11 copied to clipboard

add changes that allow to build static libs for iOS

Open johanvos opened this issue 6 years ago • 4 comments

With these changes, the static libs for the core classes can be built for iOS make java.base-libs java.prefs-libs jdk.crypto.cryptoki-libs jdk.crypto.ec-libs works

johanvos avatar Oct 08 '19 15:10 johanvos

@bobvandette it would be great if you can review this PR as well.

dougxc avatar Oct 08 '19 16:10 dougxc

I previously reviewed this patch in the Mobile projects repository and was ok with it there. These changes do not just add static library support. Most of the changes are adding OpenJDK support of iOS and Android.

The biggest problem with integrating these changes here is that the static changes now conflict with the current set of patches in the labsjdk. There are now two different Makefile variables controlling static building. STATIC_LIB_BUILD and STATIC_BUILD. We are only interested in building the libs and don't want to produce a completely static JDK set of binaries. This patch needs to be updated with this in mind. The functionality that is not related to building libraries needs to be changed from #ifdef STATIC_BUILD to #ifdef FULL_STATIC_BUILD. There are examples of this in the code.

bobvandette avatar Oct 08 '19 17:10 bobvandette

@bobvandette what would be necessary for this change to be upstreamed? Our goal would be that all the changes done in this repo can be upstreamed.

vjovanov avatar Oct 08 '19 18:10 vjovanov

@bobvandette what would be necessary for this change to be upstreamed? Our goal would be that all the changes done in this repo can be upstreamed.

We are looking at implementing some form of the static library changes upstream. These static changes will most likely be a bit different than what you have today. The current implementation requires two builds of the JDK. We want to do this in a single build. (ie. Build shared and static libraries during a single build).

Adding new supported platforms (iOS and Android) is a bit more complex. I've had discussions with Johan and put him in touch with the folks that handle porting and new platforms for OpenJDK.

bobvandette avatar Oct 08 '19 18:10 bobvandette