diff options
author | serenityosrocks <serenityosrocks@gmail.com> | 2022-01-29 15:27:59 -0800 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2022-02-07 02:25:32 +0000 |
commit | 7371d16b03010a6138838fdaaf3c4f286de7af3e (patch) | |
tree | 47192ee8c5cb25a3e59602c862b5c6cee83d04f1 /Meta/run.sh | |
parent | 89cd00b540cfe36d86a402501efc4f48c4b436af (diff) | |
download | serenity-7371d16b03010a6138838fdaaf3c4f286de7af3e.zip |
Meta: Fix "Meta/serenity.sh run x86_64 Clang" on M1 Macs
QEMU crashes on M1 Macs when using `--accel hvf` option.
To solve this, detect the host's architecture and only add the
`--accel hvf` parameter if we are running on a "x86_64" machine.
This will allow "arm64" machines like M1 Macs to work correctly.
Diffstat (limited to 'Meta/run.sh')
-rwxr-xr-x | Meta/run.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Meta/run.sh b/Meta/run.sh index ebd4677402..8d320e1747 100755 --- a/Meta/run.sh +++ b/Meta/run.sh @@ -38,8 +38,10 @@ if [ "$(uname)" = "Darwin" ]; then [ -z "$SERENITY_QEMU_BIN" ] && SERENITY_QEMU_BIN="qemu-system-aarch64" fi - if $SERENITY_QEMU_BIN --accel help | grep -q hvf; then - SERENITY_VIRT_TECH_ARG="--accel hvf" + if [ "$(uname -m)" = "x86_64" ]; then + if $SERENITY_QEMU_BIN --accel help | grep -q hvf; then + SERENITY_VIRT_TECH_ARG="--accel hvf" + fi fi fi |