Skip to content

Commit

Permalink
Fixed engine native in non Apple Silicon
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Nov 20, 2020
1 parent 85701c3 commit d161d4a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/engine-native/src/artifact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,14 @@ impl NativeArtifact {
"-nostdlib".to_string(),
]
} else {
vec![format!("--target={}", target_triple_str)]
// We are explicit on the target when the host system is
// Apple Silicon, otherwise compilation fails.
if target_triple_str == "arm64-apple-darwin" {
vec![format!("--target={}", target_triple_str)]
}
else {
vec![]
}
};
let target_args = match (target_triple.operating_system, is_cross_compiling) {
(OperatingSystem::Windows, true) => vec!["-Wl,/force:unresolved,/noentry"],
Expand Down

0 comments on commit d161d4a

Please sign in to comment.