Skip to content

Commit

Permalink
Support ARM / M1 macOS in validate.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
9999years authored and Mikolaj committed Sep 5, 2024
1 parent 13041ba commit 60cae7f
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -299,15 +299,35 @@ JOBS="-j$JOBS"
# assume compiler is GHC
RUNHASKELL=$(echo "$HC" | sed -E 's/ghc(-[0-9.]*)$/runghc\1/')

case "$(uname)" in
ARCH=$(uname -m)

case "$ARCH" in
arm64)
ARCH=aarch64
;;
x86_64)
ARCH=x86_64
;;
*)
echo "Warning: Unknown architecture '$ARCH'"
;;
esac

OS=$(uname)

case "$OS" in
MINGW64*)
ARCH="x86_64-windows"
ARCH="$ARCH-windows"
;;
Linux)
ARCH="$ARCH-linux"
;;
Linux )
ARCH="x86_64-linux"
Darwin)
ARCH="$ARCH-osx"
;;
*)
ARCH="x86_64-osx"
echo "Warning: Unknown operating system '$OS'"
ARCH="$ARCH-$OS"
;;
esac

Expand Down

0 comments on commit 60cae7f

Please sign in to comment.