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

Fix OS architecture for darwin aarch64 builds of static libs #3828

Closed
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
10 changes: 7 additions & 3 deletions sbin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1479,12 +1479,16 @@ cleanAndMoveArchiveFiles() {
osArch="amd64"
fi

# TODO: Remove the "if" below once OS_ARCHITECTURE has been replaced.
# This is because OS_ARCHITECTURE is currently the build arch, not the target arch,
# and that confuses things when cross-compiling an x64 mac build on arm mac.
if [ "${BUILD_CONFIG[OS_ARCHITECTURE]}" = "arm64" ]; then
# TODO: Remove the "if" below once OS_ARCHITECTURE has been replaced.
# This is because OS_ARCHITECTURE is currently the build arch, not the target arch,
# and that confuses things when cross-compiling an x64 mac build on arm mac.
if [[ "${BUILD_CONFIG[TARGET_FILE_NAME]}" =~ .*_x64_.* ]]; then
osArch="amd64"
else
# GraalVM expects aarch64 for arm64 builds on MacOS. This is also consistent
# with linux and windows builds.
osArch="aarch64"
fi
fi

Expand Down
Loading