mirror of
https://github.com/AngelAuraMC/angelauramc-openjdk-build.git
synced 2025-08-03 15:46:08 -04:00

* .github: move apt commands to workflow
the scripts are capable of running on other distros, so "let the host cook"
also explicitly use Python 3 here as the build env do not use Python 2
* treewide: use bash [[
./buildlibs.sh: line 18: [: : integer expression expected
...
./buildjdk.sh: line 53: [: : integer expression expected
...
all scripts has bash shebang anyways,
replace all single brackets [ with bash's double brackets [[
* [hack] tarjdk: force termux-elf-cleaner v2.2.0
g++: error: unrecognized command line option ‘-std=c++20’; did you mean ‘-std=c++2a’?
caused by a mix of our outdated toolchains and an upstream commit [1]
downgrade the version of termux-elf-cleaner we use to the latest stable tag to workaround the issue
[1]: 9578f2c4bc
Test: presubmit
Signed-off-by: fukiame <fukiame@proton.me>
* .github: update actions
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/setup-java@v1, actions/upload-artifact@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
* .github: actions runner: update to ubuntu-22.04
a bit of future-proofing wont hurt... right?
* fixup! .github: java setup: its 7 not 1.7
i retartded
---------
Signed-off-by: fukiame <fukiame@proton.me>
78 lines
2.1 KiB
Bash
Executable File
78 lines
2.1 KiB
Bash
Executable File
# Use the old NDK r10e to not get internal compile error at
|
|
# https://github.com/PojavLauncherTeam/openjdk-multiarch-jdk8u/blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.c
|
|
export NDK_VERSION=r10e
|
|
|
|
if [[ -z "$BUILD_FREETYPE_VERSION" ]]
|
|
then
|
|
export BUILD_FREETYPE_VERSION="2.10.4"
|
|
fi
|
|
|
|
if [[ -z "$JDK_DEBUG_LEVEL" ]]
|
|
then
|
|
export JDK_DEBUG_LEVEL=release
|
|
fi
|
|
|
|
if [[ "$TARGET_JDK" == "aarch64" ]]
|
|
then
|
|
export TARGET_SHORT=arm64
|
|
else
|
|
export TARGET_SHORT=$TARGET_JDK
|
|
fi
|
|
|
|
if [[ "$TARGET_JDK" == "aarch32" ]] || [[ "$TARGET_JDK" == "arm" ]] || [[ "$TARGET_JDK" == "x86" ]]
|
|
then
|
|
echo "VM variant: client"
|
|
if [[ -z "$JVM_VARIANTS" ]]
|
|
then
|
|
export JVM_VARIANTS=client
|
|
fi
|
|
else
|
|
echo "VM variant: server"
|
|
if [[ -z "$JVM_VARIANTS" ]]
|
|
then
|
|
export JVM_VARIANTS=server
|
|
fi
|
|
fi
|
|
|
|
if [[ "$BUILD_IOS" == "1" ]]; then
|
|
export JVM_PLATFORM=macosx
|
|
|
|
export thecc=$(xcrun -find -sdk iphoneos clang)
|
|
export thecxx=$(xcrun -find -sdk iphoneos clang++)
|
|
export thesysroot=$(xcrun --sdk iphoneos --show-sdk-path)
|
|
export themacsysroot=$(xcrun --sdk macosx --show-sdk-path)
|
|
|
|
export thehostcxx=$PWD/macos-host-cc
|
|
export CC=$PWD/ios-arm64-clang
|
|
export CXX=$PWD/ios-arm64-clang++
|
|
export LD=$(xcrun -find -sdk iphoneos ld)
|
|
|
|
export HOTSPOT_DISABLE_DTRACE_PROBES=1
|
|
|
|
export ANDROID_INCLUDE=$PWD/ios-missing-include
|
|
else
|
|
|
|
export JVM_PLATFORM=linux
|
|
# Set NDK
|
|
export API=21
|
|
export NDK=`pwd`/android-ndk-$NDK_VERSION
|
|
export ANDROID_NDK_ROOT=$NDK
|
|
export TOOLCHAIN=$NDK/generated-toolchains/android-${TARGET_SHORT}-toolchain
|
|
# export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64
|
|
|
|
export ANDROID_INCLUDE=$TOOLCHAIN/sysroot/usr/include
|
|
|
|
export CPPFLAGS="-I$ANDROID_INCLUDE -I$ANDROID_INCLUDE/$TARGET" # -I/usr/include -I/usr/lib
|
|
export LDFLAGS="-L$NDK/platforms/android-$API/arch-$TARGET_SHORT/usr/lib"
|
|
|
|
# Configure and build.
|
|
export AR=$TOOLCHAIN/bin/$TARGET-ar
|
|
export AS=$TOOLCHAIN/bin/$TARGET-as
|
|
export CC=$TOOLCHAIN/bin/$TARGET-gcc
|
|
export CXX=$TOOLCHAIN/bin/$TARGET-g++
|
|
export LD=$TOOLCHAIN/bin/$TARGET-ld
|
|
export OBJCOPY=$TOOLCHAIN/bin/$TARGET-objcopy
|
|
export RANLIB=$TOOLCHAIN/bin/$TARGET-ranlib
|
|
export STRIP=$TOOLCHAIN/bin/$TARGET-strip
|
|
fi
|