Skip to content

Commit

Permalink
Jdk8 mac xcode restore after cross compiling on arm64 with Xcode-11.7 (
Browse files Browse the repository at this point in the history
…#3873)

* Restore jdk8u mac x64 to original Xcode.app after build

Signed-off-by: Andrew Leonard <[email protected]>

* Restore jdk8u mac x64 to original Xcode.app after build

Signed-off-by: Andrew Leonard <[email protected]>

---------

Signed-off-by: Andrew Leonard <[email protected]>
  • Loading branch information
andrew-m-leonard authored Jul 3, 2024
1 parent 5fde815 commit 32749a0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build-farm/make-adopt-build-farm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,13 @@ CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM//\"/temporary
# shellcheck disable=SC2086
bash -c "$MAC_ROSETTA_PREFIX $PLATFORM_SCRIPT_DIR/../makejdk-any-platform.sh --clean-git-repo --jdk-boot-dir ${JDK_BOOT_DIR} --configure-args \"${CONFIGURE_ARGS_FOR_ANY_PLATFORM}\" --target-file-name ${FILENAME} ${TAG_OPTION} ${OPTIONS} ${BUILD_ARGS} ${VARIANT_ARG} ${JAVA_TO_BUILD}"

# If this is jdk8u on mac x64 that has cross compiled on arm64 we need to restore Xcode from the Xcode-11.7.app to default
if [[ "${JAVA_TO_BUILD}" == "${JDK8_VERSION}" ]] && [[ -n "$MAC_ROSETTA_PREFIX" ]]; then
echo "Restoring Xcode select to /"
echo "[WARNING] You may be asked for your su user password, attempting to switch Xcode version to /"
sudo xcode-select --switch /
fi

if [ -d "${WORKSPACE}" ]; then
SPACEUSED=$(du -sk "$WORKSPACE")
echo "Total disk space in Kb consumed by build process: $SPACEUSED"
Expand Down

0 comments on commit 32749a0

Please sign in to comment.