Skip to content

Commit

Permalink
Fix OS architecture for darwin aarch64 builds of static libs (#3827)
Browse files Browse the repository at this point in the history
This is a follow up to
#2725.

`uname -m` seems to return `arm64` on MacOS but the expected naming
seems to be `aarch64` ( which is consistend with linux and windows as
well) as observed in
graalvm/mandrel-packaging#415 (comment)

Co-authored-by: Martijn Verburg <[email protected]>
  • Loading branch information
zakkak and karianna authored Jun 1, 2024
1 parent 39a0b00 commit 206787d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions sbin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1516,12 +1516,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

0 comments on commit 206787d

Please sign in to comment.