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 e30a7648a8..c0ee603760 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 7c097ba068..531de3ceb9 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