Skip to content
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

Default Temurin jdk-21+ to use bundled FreeType #3557

Merged
merged 10 commits into from
Dec 5, 2023
9 changes: 7 additions & 2 deletions build-farm/platform-specific-configurations/aix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,17 @@ then
export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --with-extra-ldflags=-lpthread --with-extra-cflags=-lpthread --with-extra-cxxflags=-lpthread"
fi

export BUILD_ARGS="${BUILD_ARGS} --skip-freetype"
if [[ ("${VARIANT}" == "${BUILD_VARIANT_TEMURIN}" || "${VARIANT}" == "${BUILD_VARIANT_HOTSPOT}") && "$JAVA_FEATURE_VERSION" -ge 21 ]]; then
# Temurin/hotspot jdk-21+ uses "bundled" FreeType
export BUILD_ARGS="${BUILD_ARGS} --freetype-dir bundled"
else
export BUILD_ARGS="${BUILD_ARGS} --skip-freetype"
fi

if [ "${VARIANT}" == "${BUILD_VARIANT_OPENJ9}" ]; then
export LDR_CNTRL=MAXDATA=0x80000000
fi
echo LDR_CNTRL=$LDR_CNTRL
echo LDR_CNTRL="$LDR_CNTRL"

BOOT_JDK_VARIABLE="JDK${JDK_BOOT_VERSION}_BOOT_DIR"
if [ ! -d "$(eval echo "\$$BOOT_JDK_VARIABLE")" ]; then
Expand Down
9 changes: 7 additions & 2 deletions build-farm/platform-specific-configurations/alpine-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ fi
# ccache seems flaky on alpine
export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --disable-ccache"

# We don't bundle freetype on alpine anymore, and expect the user to have it.
export BUILD_ARGS="${BUILD_ARGS} --skip-freetype"
if [[ ("${VARIANT}" == "${BUILD_VARIANT_TEMURIN}" || "${VARIANT}" == "${BUILD_VARIANT_HOTSPOT}") && "$JAVA_FEATURE_VERSION" -ge 21 ]]; then
# Temurin/hotspot jdk-21+ uses "bundled" FreeType
export BUILD_ARGS="${BUILD_ARGS} --freetype-dir bundled"
else
# We don't bundle freetype on alpine anymore, and expect the user to have it.
export BUILD_ARGS="${BUILD_ARGS} --skip-freetype"
fi

BOOT_JDK_VARIABLE="JDK${JDK_BOOT_VERSION}_BOOT_DIR"
if [ ! -d "$(eval echo "\$$BOOT_JDK_VARIABLE")" ]; then
Expand Down
10 changes: 8 additions & 2 deletions build-farm/platform-specific-configurations/linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# shellcheck source=sbin/common/constants.sh
source "$SCRIPT_DIR/../../sbin/common/constants.sh"
# Bundling our own freetype can cause problems, so we skip that on linux.
export BUILD_ARGS="${BUILD_ARGS} --skip-freetype"

if [[ ("${VARIANT}" == "${BUILD_VARIANT_TEMURIN}" || "${VARIANT}" == "${BUILD_VARIANT_HOTSPOT}") && "$JAVA_FEATURE_VERSION" -ge 21 ]]; then
andrew-m-leonard marked this conversation as resolved.
Show resolved Hide resolved
# Temurin/hotspot jdk-21+ uses "bundled" FreeType
export BUILD_ARGS="${BUILD_ARGS} --freetype-dir bundled"
else
# Bundling our own freetype can cause problems, so we skip that on linux.
export BUILD_ARGS="${BUILD_ARGS} --skip-freetype"
fi

NATIVE_API_ARCH=$(uname -m)
if [ "${NATIVE_API_ARCH}" = "x86_64" ]; then NATIVE_API_ARCH=x64; fi
Expand Down
5 changes: 5 additions & 0 deletions build-farm/platform-specific-configurations/mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ else
fi
fi

if [[ ("${VARIANT}" == "${BUILD_VARIANT_TEMURIN}" || "${VARIANT}" == "${BUILD_VARIANT_HOTSPOT}") && "$JAVA_FEATURE_VERSION" -ge 21 ]]; then
# Temurin/hotspot jdk-21+ uses "bundled" FreeType
export BUILD_ARGS="${BUILD_ARGS} --freetype-dir bundled"
andrew-m-leonard marked this conversation as resolved.
Show resolved Hide resolved
fi

# The configure option '--with-macosx-codesign-identity' is supported in JDK8 OpenJ9 and JDK11 and JDK14+
if [[ ( "$JAVA_FEATURE_VERSION" -eq 11 ) || ( "$JAVA_FEATURE_VERSION" -ge 14 ) ]]
then
Expand Down
5 changes: 5 additions & 0 deletions build-farm/platform-specific-configurations/windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,11 @@ then
fi
fi

if [[ ("${VARIANT}" == "${BUILD_VARIANT_TEMURIN}" || "${VARIANT}" == "${BUILD_VARIANT_HOTSPOT}") && "$JAVA_FEATURE_VERSION" -ge 21 ]]; then
# Temurin/hotspot jdk-21+ uses "bundled" FreeType
export BUILD_ARGS="${BUILD_ARGS} --freetype-dir bundled"
fi

if [ "${ARCHITECTURE}" == "aarch64" ]; then
export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --disable-ccache --openjdk-target=aarch64-unknown-cygwin"
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ public void freetypeOnlyBundledOnCertainPlatforms() throws IOException {
.filter(name -> freetypePattern.matcher(name).matches())
.collect(Collectors.toSet());

if (jdkPlatform.runsOn(OperatingSystem.MACOS)) {
if (!jdkVersion.usesVM(VM.OPENJ9) && jdkVersion.isNewerOrEqual(21)) {
// Temurin/hotspot jdk-21+ uses "bundled" FreeType
assertTrue(freetypeFiles.size() > 0,
"Expected libfreetype.dylib to be bundled but it is not.");
} else if (jdkPlatform.runsOn(OperatingSystem.MACOS)) {
assertTrue(freetypeFiles.size() > 0,
"Expected libfreetype.dylib to be bundled but it is not.");
} else if (jdkPlatform.runsOn(OperatingSystem.WINDOWS)) {
Expand Down
Loading