We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44dd753 commit c602f8fCopy full SHA for c602f8f
onnxruntime-sys/build.rs
@@ -62,6 +62,15 @@ fn main() {
62
fn generate_bindings(_include_dir: &Path) {
63
println!("Bindings not generated automatically, using committed files instead.");
64
println!("Enable with the 'generate-bindings' cargo feature.");
65
+
66
+ let os = env::var("CARGO_CFG_TARGET_OS").expect("Unable to get TARGET_OS");
67
+ let arch = env::var("CARGO_CFG_TARGET_ARCH").expect("Unable to get TARGET_ARCH");
68
+ if os == "macos" && arch == "aarch64" {
69
+ panic!(
70
+ "OnnxRuntime {} bindings for Apple M1 are not available",
71
+ ORT_VERSION
72
+ );
73
+ }
74
}
75
76
#[cfg(feature = "generate-bindings")]
0 commit comments