We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ddeadd5 commit 3a95885Copy full SHA for 3a95885
1 file changed
build.rs
@@ -741,6 +741,15 @@ fn link_libraries(
741
_ => {}
742
}
743
744
+ // Prebuilt MNN for macOS/iOS includes Metal backend, so always link Apple frameworks
745
+ if matches!(link_mode, MnnLinkMode::Prebuilt) && matches!(os, "macos" | "ios") {
746
+ println!("cargo:rustc-link-lib=framework=Foundation");
747
+ println!("cargo:rustc-link-lib=framework=CoreFoundation");
748
+ println!("cargo:rustc-link-lib=framework=Metal");
749
+ println!("cargo:rustc-link-lib=framework=MetalPerformanceShaders");
750
+ println!("cargo:rustc-link-lib=objc");
751
+ }
752
+
753
// CoreML frameworks
754
if coreml_enabled && matches!(os, "macos" | "ios") {
755
println!("cargo:rustc-link-lib=framework=CoreML");
0 commit comments