From a7c157ea9879091b3296aea703d597e8129da279 Mon Sep 17 00:00:00 2001 From: Spartan322 Date: Sat, 4 Oct 2025 17:37:20 -0400 Subject: [PATCH 1/2] Revert "Remove unnecessary Cocoa reference" This reverts commit 49fff6a31ff582f2ccbbbb9035a9c00462fdd64c. --- tools/macos.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/macos.py b/tools/macos.py index 545b06a..f96310c 100644 --- a/tools/macos.py +++ b/tools/macos.py @@ -1,4 +1,4 @@ -# Based on https://github.com/godotengine/godot-cpp/blob/e83fd0904c13356ed1d4c3d09f8bb9132bdc6b77/tools/macos.py +# Based on https://github.com/godotengine/godot-cpp/blob/98ea2f60bb3846d6ae410d8936137d1b099cd50b/tools/macos.py import os import sys @@ -68,6 +68,14 @@ def generate(env): env.Append(CCFLAGS=["-isysroot", env["macos_sdk_path"]]) env.Append(LINKFLAGS=["-isysroot", env["macos_sdk_path"]]) + env.Append( + LINKFLAGS=[ + "-framework", + "Cocoa", + "-Wl,-undefined,dynamic_lookup", + ] + ) + if env["use_ubsan"] or env["use_asan"] or env["use_tsan"]: env.extra_suffix += ".san" env.Append(CCFLAGS=["-DSANITIZERS_ENABLED"]) From 6b33eb4e3a55c19787fa916edf651bfdcbc35e02 Mon Sep 17 00:00:00 2001 From: Spartan322 Date: Sat, 4 Oct 2025 17:38:12 -0400 Subject: [PATCH 2/2] Prefer Foundation framework to Cocoa for Mac --- tools/macos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/macos.py b/tools/macos.py index f96310c..35b96b5 100644 --- a/tools/macos.py +++ b/tools/macos.py @@ -71,7 +71,7 @@ def generate(env): env.Append( LINKFLAGS=[ "-framework", - "Cocoa", + "Foundation", "-Wl,-undefined,dynamic_lookup", ] )