Files
tfhe-rs/scripts/get_arch_feature.sh
Petar Ivanov 6a3d579749 fix(tools): fix arch detection script for aarch64
On Linux with Apple M1, the output of `uname -a` is:

```
Linux ... aarch64 aarch64 aarch64 GNU/Linux
```

Therefore, recognize that output as aarch64.
2022-12-16 13:53:13 +01:00

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}"