Skip to content

Commit

Permalink
Possible fix for build failure
Browse files Browse the repository at this point in the history
  • Loading branch information
dae committed Jun 22, 2023
1 parent a35665a commit d7a2540
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build_rust/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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(())
}

0 comments on commit d7a2540

Please sign in to comment.