From d7a254037850974b86f415888c754ec37b9548ac Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 22 Jun 2023 23:52:18 +1000 Subject: [PATCH] Possible fix for build failure --- build_rust/src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build_rust/src/main.rs b/build_rust/src/main.rs index f068c5990..90e557ae1 100644 --- a/build_rust/src/main.rs +++ b/build_rust/src/main.rs @@ -3,6 +3,7 @@ use anki_process::CommandExt; use anyhow::Result; use camino::Utf8Path; use std::env; +use std::env::consts::OS; use std::path::Path; use std::process::Command; @@ -226,6 +227,9 @@ fn build_rsdroid(is_release: bool, target_arch: &str, target_dir: &Utf8Path) -> if !target_arch.is_empty() { command.args(["--target", target_arch]); } + if OS == "macos" && target_arch == "x86_64-unknown-linux-gnu" { + command.env("CC", "x86_64-unknown-linux-gnu-gcc"); + } command.ensure_success()?; Ok(()) }