Skip to content

Commit a3d27d7

Browse files
committed
Fix(iOS): apply script changes from jre17-21 branch
1 parent c62cba0 commit a3d27d7

File tree

4 files changed

+7
-25
lines changed

4 files changed

+7
-25
lines changed

buildjdk.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ else
4444
platform_args="--with-toolchain-type=clang SDKNAME=iphoneos"
4545
# --disable-precompiled-headers
4646
AUTOCONF_x11arg="--with-x=/opt/X11/include/X11 --prefix=/usr/lib"
47-
sameflags="-arch arm64 -isysroot $thesysroot -miphoneos-version-min=14.0 -DHEADLESS=1 -I$PWD/ios-missing-include -Wno-implicit-function-declaration"
47+
sameflags="-arch arm64 -DHEADLESS=1 -I$PWD/ios-missing-include -Wno-implicit-function-declaration"
4848
export CFLAGS+=" $sameflags"
49-
export CXXFLAGS="$sameflags"
50-
export LDFLAGS+=" -miphoneos-version-min=14.0"
49+
export LDFLAGS+=" -arch arm64"
50+
export BUILD_SYSROOT_CFLAGS="-isysroot ${themacsysroot}"
5151

5252
HOMEBREW_NO_AUTO_UPDATE=1 brew install ldid xquartz
5353
fi

buildlibs.sh

+2-20
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,7 @@ cd freetype-$BUILD_FREETYPE_VERSION
55

66
echo "Building Freetype"
77

8-
if [[ "$BUILD_IOS" == "1" ]]; then
9-
LDFLAGS=-"arch arm64 -isysroot $thesysroot -miphoneos-version-min=12.0"
10-
11-
export CC=$thecc
12-
export CXX=$thecxx
13-
./configure \
14-
--host=$TARGET \
15-
--prefix=${PWD}/build_android-${TARGET_SHORT} \
16-
--enable-shared=no --enable-static=yes \
17-
--without-zlib \
18-
--with-brotli=no \
19-
--with-png=no \
20-
--with-harfbuzz=no \
21-
"CFLAGS=-arch arm64 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -Os -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=12.0 -I$thesysroot/usr/include/libxml2/ -isysroot $thesysroot" \
22-
AR=/usr/bin/ar \
23-
"LDFLAGS=$LDFLAGS" \
24-
|| error_code=$?
25-
namefreetype=build_android-${TARGET_SHORT}/lib/libfreetype
26-
else
8+
if [[ "$BUILD_IOS" != "1" ]]; then
279
export PATH=$TOOLCHAIN/bin:$PATH
2810
./configure \
2911
--host=$TARGET \
@@ -33,7 +15,6 @@ else
3315
--with-png=no \
3416
--with-harfbuzz=no $EXTRA_ARGS \
3517
|| error_code=$?
36-
fi
3718
if [[ "$error_code" -ne 0 ]]; then
3819
echo "\n\nCONFIGURE ERROR $error_code , config.log:"
3920
cat config.log
@@ -46,3 +27,4 @@ make install
4627
if [[ -f "${namefreetype}.a" ]]; then
4728
clang -fPIC -shared $LDFLAGS -lbz2 -Wl,-all_load ${namefreetype}.a -o ${namefreetype}.dylib
4829
fi
30+
fi

ios-arm64-clang

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
exec $thecc -arch arm64 -isysroot $thesysroot "$@"
1+
exec $thecc -arch arm64 -isysroot $thesysroot -miphoneos-version-min=14.0 "$@"

ios-arm64-clang++

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
exec $thecxx -arch arm64 -isysroot $thesysroot "$@"
1+
exec $thecxx -arch arm64 -isysroot $thesysroot -miphoneos-version-min=14.0 "$@"

0 commit comments

Comments
 (0)