From 05fc9ee396d723a8e75ae9f83e3a7dc580000eac Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Tue, 15 Apr 2025 18:36:08 +0200 Subject: [PATCH] call: Fix crash when screensharing on MacOS (#28784) Closes #ISSUE Release Notes: - Fixed a crash when screensharing on MacOS Co-authored-by: Conrad Co-authored-by: Anthony Eid --- crates/gpui/build.rs | 2 -- crates/zed/build.rs | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/gpui/build.rs b/crates/gpui/build.rs index e30a7648a8a74bdb4d6ff611fe83de0422dbee87..c0ee6037609e487395c1fcc83ed5f12a0da243ab 100644 --- a/crates/gpui/build.rs +++ b/crates/gpui/build.rs @@ -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") diff --git a/crates/zed/build.rs b/crates/zed/build.rs index 7c097ba068dcf325704c3f7ac9e2220c90989723..531de3ceb9235965e2f0e8099e3aec64c873835f 100644 --- a/crates/zed/build.rs +++ b/crates/zed/build.rs @@ -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