From e40acd45a600451f8c8955db5a2c6b2b1e1c2a2a Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 12 Apr 2023 13:09:05 +1000 Subject: [PATCH] Add helper script for Intel cross compile on ARM Mac --- tools/mac-x86 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 tools/mac-x86 diff --git a/tools/mac-x86 b/tools/mac-x86 new file mode 100755 index 000000000..86a1a58e6 --- /dev/null +++ b/tools/mac-x86 @@ -0,0 +1,18 @@ +#!/bin/bash +# +# Run a command with an alternative buildroot and Intel architecture target, for building Intel on an ARM Mac. +# Eg ./mac-x86 ./tools/run-qt5.14 +# +# Uses hard-coded paths to Python and build folders. +# + +export PYTHON_BINARY=/usr/local/bin/python3.9-intel64 +export BUILD_ROOT=~/Local/build/anki-x86 +export NORMAL_BUILD_ROOT=~/Local/build/anki +export MAC_X86=1 + + +# run provided command +$* + +BUILD_ROOT=$NORMAL_BUILD_ROOT ./ninja just-to-restore-build-root-and-failure-is-expected