Skip to content

Commit

Permalink
Build: adjustment for iOS CI
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhduytran0 committed Jul 22, 2024
1 parent 90b3327 commit 45892bf
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 7 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,45 @@ jobs:
name: "jre8-debuginfo-${{matrix.arch}}"
path: dizout

build_iosport:
name: "Build for iOS aarch64"
runs-on: MacStadium
continue-on-error: true
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: set up JDK 1.7
uses: actions/setup-java@v1
with:
java-version: 1.7

- name: Build with CI build script
run: |
export BUILD_IOS=1
#brew install awk
#echo "/opt/procursus/bin:/opt/procursus/local/bin:/Users/eilionoir/.local/bin:/opt/homebrew/bin:/Users/eilionoir/Library/Python/3.9/bin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin:/opt/procursus/games" > $GITHUB_PATH
export PATH=/opt/procursus/bin:/opt/homebrew/bin:$PATH
bash "ci_build_arch_aarch64.sh"
- name: Upload JDK build output
uses: actions/upload-artifact@v2
with:
name: "jdk8-ios-aarch64"
path: jdk8*.tar.xz

- name: Upload JRE build output
uses: actions/upload-artifact@v2
with:
name: 'jre8-ios-aarch64'
path: jre8*.tar.xz

- name: Upload JRE debuginfo build output
uses: actions/upload-artifact@v2
with:
name: "jre8-ios-debuginfo-aarch64"
path: dizout

pojav:
needs: build_android
runs-on: ubuntu-22.04
Expand Down
4 changes: 2 additions & 2 deletions buildjdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ else
platform_args="--with-toolchain-type=clang SDKNAME=iphoneos"
# --disable-precompiled-headers
AUTOCONF_x11arg="--with-x=/opt/X11/include/X11 --prefix=/usr/lib"
sameflags="-arch arm64 -isysroot $thesysroot -miphoneos-version-min=11.0 -DHEADLESS=1 -I$PWD/ios-missing-include -Wno-implicit-function-declaration"
sameflags="-arch arm64 -isysroot $thesysroot -miphoneos-version-min=14.0 -DHEADLESS=1 -I$PWD/ios-missing-include -Wno-implicit-function-declaration"
export CFLAGS+=" $sameflags"
export CXXFLAGS="$sameflags"
export LDFLAGS+=" -miphoneos-version-min=11.0"
export LDFLAGS+=" -miphoneos-version-min=14.0"

HOMEBREW_NO_AUTO_UPDATE=1 brew install ldid xquartz
fi
Expand Down
2 changes: 1 addition & 1 deletion macos-host-cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ else
args=$@
fi
args=${args/"-isysroot $thesysroot"/}
args=${args/"-miphoneos-version-min=11.0"/}
args=${args/"-miphoneos-version-min=14.0"/}
$thecxx $args --stdlib=libc++ -isysroot $themacsysroot
18 changes: 14 additions & 4 deletions patches/jdk8u_ios.diff
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ index 8fc6adb3..8b5369a8 100644

return true;
diff --git a/hotspot/make/bsd/makefiles/gcc.make b/hotspot/make/bsd/makefiles/gcc.make
index b45dd47a..2cd90ea9 100644
index b45dd47a..fd94ee45 100644
--- a/hotspot/make/bsd/makefiles/gcc.make
+++ b/hotspot/make/bsd/makefiles/gcc.make
@@ -248,7 +248,8 @@ endif
Expand All @@ -291,14 +291,24 @@ index b45dd47a..2cd90ea9 100644
else
# 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation.
ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 3), 1)
@@ -350,8 +351,8 @@ ifeq ($(OS_VENDOR), Darwin)
@@ -348,10 +349,17 @@ ifeq ($(OS_VENDOR), Darwin)
MACOSX_VERSION_MIN=10.7.0
endif
# The macro takes the version with no dots, ex: 1070
CFLAGS += -DMAC_OS_X_VERSION_MIN_REQUIRED=$(subst .,,$(MACOSX_VERSION_MIN)) \
- CFLAGS += -DMAC_OS_X_VERSION_MIN_REQUIRED=$(subst .,,$(MACOSX_VERSION_MIN)) \
+ CFLAGS_TMP = -DMAC_OS_X_VERSION_MIN_REQUIRED=$(subst .,,$(MACOSX_VERSION_MIN)) \
-DMAC_OS_X_VERSION_MAX_ALLOWED=$(subst .,,$(MACOSX_VERSION_MIN)) \
- -mmacosx-version-min=$(MACOSX_VERSION_MIN)
- LFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN)
+ -miphoneos-version-min=$(MACOSX_VERSION_MIN)
+ LFLAGS += -miphoneos-version-min=$(MACOSX_VERSION_MIN)
+ LFLAGS_TMP = -miphoneos-version-min=$(MACOSX_VERSION_MIN)
+ ifdef CROSS_COMPILE_ARCH
+ HOSTCC += $(CFLAGS_TMP)
+ HOSTCXX += $(CFLAGS_TMP)
+ else
+ CFLAGS += $(CFLAGS_TMP)
+ LFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN)
+ endif
endif


Expand Down

0 comments on commit 45892bf

Please sign in to comment.