From 7759b5782d9c87e49d5f8e9ccb03fd98d8f09aa1 Mon Sep 17 00:00:00 2001 From: Arrowmaster Date: Wed, 10 Jun 2026 14:33:08 -0400 Subject: [PATCH] =?UTF-8?q?Revert=20"run.sh:=20force=20MacOs=20to=20run=20?= =?UTF-8?q?the=20executable=20natively=20when=20on=20Apple=20Sili=E2=80=A6?= =?UTF-8?q?"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 60284ed8cce4c6ad130a01468e0c0b599f6a24ac. --- assets/nix/run.sh | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/assets/nix/run.sh b/assets/nix/run.sh index 6992417..2ca1f44 100755 --- a/assets/nix/run.sh +++ b/assets/nix/run.sh @@ -115,7 +115,7 @@ abs_path() { echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")" } -# Set executable path and the extension to use for the libdoorstop shared object as well as check whether we're running on Apple Silicon +# Set executable path and the extension to use for the libdoorstop shared object os_type="$(uname -s)" case ${os_type} in Linux*) @@ -140,14 +140,6 @@ case ${os_type} in ;; esac lib_extension="dylib" - - # CPUs for Apple Silicon are in the format "Apple M.." - cpu_type="$(sysctl -n machdep.cpu.brand_string)" - case "${cpu_type}" in - Apple*) - is_apple_silicon=1 - ;; - esac ;; *) # alright whos running games on freebsd @@ -320,14 +312,4 @@ else export DYLD_INSERT_LIBRARIES="${doorstop_name}:${DYLD_INSERT_LIBRARIES}" fi -if [ -n "${is_apple_silicon}" ]; then - export ARCHPREFERENCE="arm64,x86_64" - - # We need to use arch for Apple Silicon to allow the executable to be run natively as otherwise if - # the executable is universal, supporting both x86_64 and arm64, MacOs will still run it as x86_64 - # if the parent process is running as x86. - # arch also strips the DYLD_INSERT_LIBRARIES env var so we have to pass that in manually - exec arch -e DYLD_INSERT_LIBRARIES="${DYLD_INSERT_LIBRARIES}" "$executable_path" "$@" -else - exec "$executable_path" "$@" -fi +exec "$executable_path" "$@"