call: Fix crash when screensharing on MacOS (#28784)

Closes #ISSUE

Release Notes:

- Fixed a crash when screensharing on MacOS

Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
This commit is contained in:
Piotr Osiewicz 2025-04-15 18:36:08 +02:00 committed by GitHub
parent 8f52bb92b6
commit 05fc9ee396
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -77,8 +77,6 @@ mod macos {
fn generate_dispatch_bindings() {
println!("cargo:rustc-link-lib=framework=System");
// weak link to support Catalina
println!("cargo:rustc-link-arg=-Wl,-weak_framework,ScreenCaptureKit");
let bindings = bindgen::Builder::default()
.header("src/platform/mac/dispatch.h")

View file

@ -12,6 +12,9 @@ fn main() {
// Register exported Objective-C selectors, protocols, etc
println!("cargo:rustc-link-arg=-Wl,-ObjC");
// weak link to support Catalina
println!("cargo:rustc-link-arg=-Wl,-weak_framework,ScreenCaptureKit");
}
// Populate git sha environment variable if git is available