-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8255240: Mobile builds need to exclude some modules #20
base: master
Are you sure you want to change the base?
Conversation
Add sample configure script for ios
* 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
Fix conflict related to major changes in NativeCompilation.gmk
…lar to macos and aix)
👋 Welcome back jvos! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
changed description to match the JBS issue that should get fixed with this PR. |
/reviewers 0 |
Webrevs
|
@@ -70,7 +70,9 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJDWP, \ | |||
|
|||
$(BUILD_LIBJDWP): $(call FindLib, java.base, java) | |||
|
|||
TARGETS += $(BUILD_LIBJDWP) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this work, this is not normally how we do things in the build.
If you ever want to have this upstreamed, you need to put the entire SetupJdkLibrary inside the ifeq block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only the $(eval $(call SetupJdkLibrary, BUILD_LIBJDWP
block or also the
$(BUILD_LIBJDWP): $(call FindLib, java.base, java)
TARGETS += $(BUILD_LIBJDWP)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, everything needed for the compilation. Have a look at how other libraries that are only built on specific platforms are defined (e.g. in CoreLibraries.gmk, if you struggle to find examples.)
@@ -77,4 +77,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBSAPROC, \ | |||
LIBS_windows := dbgeng.lib, \ | |||
)) | |||
|
|||
TARGETS += $(BUILD_LIBSAPROC) | |||
ifeq ($(call isTargetOs, android ios), false) | |||
TARGETS += $(BUILD_LIBSA) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same goes here. Also note that this is actually broken for non-android or ios builds, BUILD_LIBSA should be BUILD_LIBSAPROC...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for noticing, this is embarrassing!
I'll change that in the same way as I'll fix the above -- once I know if only the call to SetupJdkLibrary should be inside the test.
make/modules/java.instrument/Lib.gmk
Outdated
@@ -63,4 +63,8 @@ else | |||
endif | |||
$(BUILD_LIBINSTRUMENT): $(call FindLib, java.base, java) | |||
|
|||
TARGETS += $(BUILD_LIBINSTRUMENT) | |||
ifeq ($(call isTargetOs, android ios), false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here as well...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, will fix that too.
make/modules/java.desktop/Gensrc.gmk
Outdated
@@ -32,7 +32,7 @@ ifeq ($(call isTargetOs, windows), false) | |||
include gensrc/GensrcIcons.gmk | |||
endif | |||
|
|||
ifeq ($(call isTargetOs, linux aix), true) | |||
ifeq ($(call isTargetOs, linux aix android ios), true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should ios really have X11Wrappers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no. Will fix.
@@ -314,6 +317,9 @@ Java_com_sun_management_internal_OperatingSystemImpl_getOpenFileDescriptorCount0 | |||
free(fds); | |||
|
|||
return nfiles; | |||
#else | |||
return (100); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seem like a hack?
Also, why the parenthesis?
The GHA scripts are interesting. I did not realize it could be possible to cross-compile to ios and android on GHA. I have tried to review them, but I did not go into too much detail. If they are ever to be upstreamed, I think they will need some cleanup and be made to fit better into the existing structure, but for a separate port I assume they are okay. |
And why are you disabling the hotspot build? How can anything good come out of a JDK build without hotspot? |
@johanvos this pull request can not be integrated into git checkout staticlibs
git fetch https://git.openjdk.org/mobile.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
fix whitespace issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this looks good enough now, but the PR/JBS issue title does not seem to correlate at all to what the code does...
@@ -88,7 +90,7 @@ jobs: | |||
echo 'false' | |||
return | |||
else | |||
input='${{ secrets.JDK_SUBMIT_PLATFORMS }}' | |||
input='android-linux-aarch64, ios-macos-aarch64' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this should be reverted, otherwise you can never run a user-specified set of platforms on GHA.
@@ -0,0 +1,10 @@ | |||
# sample configure command for ios |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also don't think this belongs in the repo. A command example like this can be documented on the wiki or the JDK project web page.
@@ -41,6 +41,10 @@ runs: | |||
id: bundles | |||
run: | | |||
# Rename bundles to consistent names | |||
echo "build/${{ inputs.platform }} contents..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This (and more below) looks like debug code that could/should be removed once you have made sure the builds are working.
id: build | ||
uses: ./.github/actions/do-build | ||
with: | ||
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}' | |
make-target: 'static-libs-image ${{ inputs.make-arguments }}' |
Then you will not need the change in do-build/action.yml
@@ -39,12 +39,21 @@ inputs: | |||
runs: | |||
using: composite | |||
steps: | |||
- name: 'Build Android or iOS' | |||
id: build-android-ios | |||
run: | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a hack, put in the wrong place. See below for a better solution.
@johanvos This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
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.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/mobile.git pull/20/head:pull/20
$ git checkout pull/20
Update a local copy of the PR:
$ git checkout pull/20
$ git pull https://git.openjdk.org/mobile.git pull/20/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 20
View PR using the GUI difftool:
$ git pr show -t 20
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/mobile/pull/20.diff
Webrev
Link to Webrev Comment