From f437815d919e4636997b7d0a75e7bd7120406372 Mon Sep 17 00:00:00 2001
From: bjorn3 <17426603+bjorn3@users.noreply.github.com>
Date: Sat, 11 May 2024 14:11:53 +0000
Subject: [PATCH] Compile for x86_64 on macOS even with an arm64 host

We don't support arm64 on macOS yet.
---
 .github/workflows/abi-cafe.yml | 4 ++++
 .github/workflows/main.yml     | 8 ++++++++
 2 files changed, 12 insertions(+)

diff --git a/.github/workflows/abi-cafe.yml b/.github/workflows/abi-cafe.yml
index 36ed44f9fec..b7063f35a3e 100644
--- a/.github/workflows/abi-cafe.yml
+++ b/.github/workflows/abi-cafe.yml
@@ -51,6 +51,10 @@ jobs:
       if: matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
       run: rustup set default-host x86_64-pc-windows-gnu
 
+    - name: Use x86_64 compiler on macOS
+      if: matrix.os == 'macos-latest' && matrix.env.TARGET_TRIPLE == 'x86_64-apple-darwin'
+      run: rustup set default-host x86_64-apple-darwin
+
     - name: Select XCode version
       if: matrix.os == 'macos-latest'
       run: sudo xcode-select -s /Applications/Xcode_14.3.1.app
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 4ab50ab74fe..1f5a6513f63 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -98,6 +98,10 @@ jobs:
       if: matrix.os == 'windows-latest' && matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
       run: rustup set default-host x86_64-pc-windows-gnu
 
+    - name: Use x86_64 compiler on macOS
+      if: matrix.os == 'macos-latest' && matrix.env.TARGET_TRIPLE == 'x86_64-apple-darwin'
+      run: rustup set default-host x86_64-apple-darwin
+
     - name: Install toolchain and emulator
       if: matrix.apt_deps != null
       run: |
@@ -234,6 +238,10 @@ jobs:
       if: matrix.os == 'windows-latest' && matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
       run: rustup set default-host x86_64-pc-windows-gnu
 
+    - name: Use x86_64 compiler on macOS
+      if: matrix.os == 'macos-latest' && matrix.env.TARGET_TRIPLE == 'x86_64-apple-darwin'
+      run: rustup set default-host x86_64-apple-darwin
+
     - name: Install MinGW toolchain
       if: matrix.os == 'ubuntu-latest' && matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
       run: |