Skip to content

Commit 60cae7f

Browse files
9999yearsMikolaj
authored andcommitted
Support ARM / M1 macOS in validate.sh
1 parent 13041ba commit 60cae7f

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

validate.sh

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,15 +299,35 @@ JOBS="-j$JOBS"
299299
# assume compiler is GHC
300300
RUNHASKELL=$(echo "$HC" | sed -E 's/ghc(-[0-9.]*)$/runghc\1/')
301301

302-
case "$(uname)" in
302+
ARCH=$(uname -m)
303+
304+
case "$ARCH" in
305+
arm64)
306+
ARCH=aarch64
307+
;;
308+
x86_64)
309+
ARCH=x86_64
310+
;;
311+
*)
312+
echo "Warning: Unknown architecture '$ARCH'"
313+
;;
314+
esac
315+
316+
OS=$(uname)
317+
318+
case "$OS" in
303319
MINGW64*)
304-
ARCH="x86_64-windows"
320+
ARCH="$ARCH-windows"
321+
;;
322+
Linux)
323+
ARCH="$ARCH-linux"
305324
;;
306-
Linux )
307-
ARCH="x86_64-linux"
325+
Darwin)
326+
ARCH="$ARCH-osx"
308327
;;
309328
*)
310-
ARCH="x86_64-osx"
329+
echo "Warning: Unknown operating system '$OS'"
330+
ARCH="$ARCH-$OS"
311331
;;
312332
esac
313333

0 commit comments

Comments
 (0)