Skip to content

Commit

Permalink
Merge pull request #10293 from 9999years/cabal-validate-sh
Browse files Browse the repository at this point in the history
Support ARM / M1 macOS in `validate.sh`
  • Loading branch information
mergify[bot] authored Sep 5, 2024
2 parents 13041ba + 60cae7f commit d57001a
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 d57001a

Please sign in to comment.