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

Add --openjdk-target=x86_64-apple-darwin argument when crosscompiling jdk11+ (Mac) #3502

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion build-farm/platform-specific-configurations/mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,17 @@ export BUILD_ARGS="${BUILD_ARGS}"
## is x64 then we need to add the cross compilation option --openjdk-target=x86_64-apple-darwin
MACHINEARCHITECTURE=$(uname -m)

if [[ "${MACHINEARCHITECTURE}" == "arm64" ]] && [[ "${ARCHITECTURE}" == "x64" ]]; then
# Adds cross compilation arg if building x64 binary on arm64
export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --openjdk-target=x86_64-apple-darwin"
fi

if [ "${JAVA_TO_BUILD}" == "${JDK8_VERSION}" ]
then
XCODE_SWITCH_PATH="/Applications/Xcode-11.7.app"
export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --with-toolchain-type=clang"
if [[ "${MACHINEARCHITECTURE}" == "arm64" ]] && [[ "${ARCHITECTURE}" == "x64" ]]; then
export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --openjdk-target=x86_64-apple-darwin"
# Cross compilation config needed only for jdk8
export MAC_ROSETTA_PREFIX="arch -x86_64"
export PATH=/opt/homebrew/bin:/usr/local/bin:$PATH
fi
Expand Down
Loading