mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-09 14:47:56 -05:00
On Linux with Apple M1, the output of `uname -a` is: ``` Linux ... aarch64 aarch64 aarch64 GNU/Linux ``` Therefore, recognize that output as aarch64.
20 lines
329 B
Bash
Executable File
20 lines
329 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
ARCH_FEATURE=x86_64
|
|
|
|
IS_AARCH64="$( (uname -a | grep -c "arm64\|aarch64") || true)"
|
|
|
|
if [[ "${IS_AARCH64}" != "0" ]]; then
|
|
ARCH_FEATURE=aarch64
|
|
fi
|
|
|
|
UNAME="$(uname)"
|
|
|
|
if [[ "${UNAME}" == "Linux" || "${UNAME}" == "Darwin" ]]; then
|
|
ARCH_FEATURE="${ARCH_FEATURE}-unix"
|
|
fi
|
|
|
|
echo "${ARCH_FEATURE}"
|