prefer system ape

This commit is contained in:
Brett Jia 2025-02-08 12:21:01 -05:00 committed by GitHub
parent 161ec3ffb7
commit fa66484051
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -40,19 +40,21 @@ fi
$MAKE -j$NPROC m= \ $MAKE -j$NPROC m= \
$APELINK $APELINK
case $(uname -s) in if ! APE=$(command -v ape); then
Darwin) case $(uname -s) in
case $(mode) in Darwin)
aarch64) case $(mode) in
cc -O -o "$TMPDIR/ape.$$" .cosmocc/current/bin/ape-m1.c || exit aarch64)
trap 'rm "$TMPDIR/ape.$$"' EXIT cc -O -o "$TMPDIR/ape.$$" .cosmocc/current/bin/ape-m1.c || exit
APE=$TMPDIR/ape.$$ trap 'rm "$TMPDIR/ape.$$"' EXIT
APE=$TMPDIR/ape.$$
;;
*) APE=.cosmocc/current/bin/ape-x86_64.macho ;;
esac
;; ;;
*) APE=.cosmocc/current/bin/ape-x86_64.macho ;; *) APE=.cosmocc/current/bin/ape-$(uname -m).elf ;;
esac esac
;; fi
*) APE=.cosmocc/current/bin/ape-$(uname -m).elf ;;
esac
stat $APE stat $APE
$MAKE -j$NPROC m=$AMD64 \ $MAKE -j$NPROC m=$AMD64 \