Skip to content

Commit

Permalink
Fix(iOS): apply script changes from jre17-21 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhduytran0 committed Nov 30, 2024
1 parent c62cba0 commit a3d27d7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 25 deletions.
6 changes: 3 additions & 3 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=14.0 -DHEADLESS=1 -I$PWD/ios-missing-include -Wno-implicit-function-declaration"
sameflags="-arch arm64 -DHEADLESS=1 -I$PWD/ios-missing-include -Wno-implicit-function-declaration"
export CFLAGS+=" $sameflags"
export CXXFLAGS="$sameflags"
export LDFLAGS+=" -miphoneos-version-min=14.0"
export LDFLAGS+=" -arch arm64"
export BUILD_SYSROOT_CFLAGS="-isysroot ${themacsysroot}"

HOMEBREW_NO_AUTO_UPDATE=1 brew install ldid xquartz
fi
Expand Down
22 changes: 2 additions & 20 deletions buildlibs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,7 @@ cd freetype-$BUILD_FREETYPE_VERSION

echo "Building Freetype"

if [[ "$BUILD_IOS" == "1" ]]; then
LDFLAGS=-"arch arm64 -isysroot $thesysroot -miphoneos-version-min=12.0"

export CC=$thecc
export CXX=$thecxx
./configure \
--host=$TARGET \
--prefix=${PWD}/build_android-${TARGET_SHORT} \
--enable-shared=no --enable-static=yes \
--without-zlib \
--with-brotli=no \
--with-png=no \
--with-harfbuzz=no \
"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" \
AR=/usr/bin/ar \
"LDFLAGS=$LDFLAGS" \
|| error_code=$?
namefreetype=build_android-${TARGET_SHORT}/lib/libfreetype
else
if [[ "$BUILD_IOS" != "1" ]]; then
export PATH=$TOOLCHAIN/bin:$PATH
./configure \
--host=$TARGET \
Expand All @@ -33,7 +15,6 @@ else
--with-png=no \
--with-harfbuzz=no $EXTRA_ARGS \
|| error_code=$?
fi
if [[ "$error_code" -ne 0 ]]; then
echo "\n\nCONFIGURE ERROR $error_code , config.log:"
cat config.log
Expand All @@ -46,3 +27,4 @@ make install
if [[ -f "${namefreetype}.a" ]]; then
clang -fPIC -shared $LDFLAGS -lbz2 -Wl,-all_load ${namefreetype}.a -o ${namefreetype}.dylib
fi
fi
2 changes: 1 addition & 1 deletion ios-arm64-clang
Original file line number Diff line number Diff line change
@@ -1 +1 @@
exec $thecc -arch arm64 -isysroot $thesysroot "$@"
exec $thecc -arch arm64 -isysroot $thesysroot -miphoneos-version-min=14.0 "$@"
2 changes: 1 addition & 1 deletion ios-arm64-clang++
Original file line number Diff line number Diff line change
@@ -1 +1 @@
exec $thecxx -arch arm64 -isysroot $thesysroot "$@"
exec $thecxx -arch arm64 -isysroot $thesysroot -miphoneos-version-min=14.0 "$@"

0 comments on commit a3d27d7

Please sign in to comment.