Skip to content

Commit e552654

Browse files
committed
Revert "Change LINKFLAGS to FRAMEWORKS which is supported since Scons release 0.96.91"
This reverts commit 2e152b9. SCons `FRAMEWORKS` is, according to their latest docs, only supported "On Mac OS X with gcc". While the "with gcc" part seems bogus, godotengine#36795 did introduce a link failure for our osxcross toolchain for compiling macOS binaries from Linux. SCons probably fails to detect this as a macOS target and does not use its `FRAMEWORKS` logic properly. So using `LINKFLAGS` as we used to is the more portable solution.
1 parent efc0a5a commit e552654

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

platform/osx/detect.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ def configure(env):
149149

150150
env.Prepend(CPPPATH=['#platform/osx'])
151151
env.Append(CPPDEFINES=['OSX_ENABLED', 'UNIX_ENABLED', 'GLES_ENABLED', 'APPLE_STYLE_KEYS', 'COREAUDIO_ENABLED', 'COREMIDI_ENABLED'])
152-
env.AppendUnique(FRAMEWORKS=['Cocoa', 'Carbon', 'OpenGL', 'AGL', 'AudioUnit', 'CoreAudio', 'CoreMIDI', 'IOKit', 'ForceFeedback', 'AVFoundation', 'CoreMedia', 'CoreVideo'])
153-
env.Append(LIBS=['pthread', 'z'])
152+
env.Append(LINKFLAGS=['-framework', 'Cocoa', '-framework', 'Carbon', '-framework', 'OpenGL', '-framework', 'AGL', '-framework', 'AudioUnit', '-framework', 'CoreAudio', '-framework', 'CoreMIDI', '-lz', '-framework', 'IOKit', '-framework', 'ForceFeedback', '-framework', 'AVFoundation', '-framework', 'CoreMedia', '-framework', 'CoreVideo'])
153+
env.Append(LIBS=['pthread'])
154154

155155
env.Append(CCFLAGS=['-mmacosx-version-min=10.9'])
156156
env.Append(LINKFLAGS=['-mmacosx-version-min=10.9'])

platform/server/detect.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,7 @@ def configure(env):
228228
env.Append(CPPDEFINES=['SERVER_ENABLED', 'UNIX_ENABLED'])
229229

230230
if (platform.system() == "Darwin"):
231-
env.AppendUnique(FRAMEWORKS=['Cocoa', 'Carbon', 'IOKit'])
232-
env.Append(LIBS=['z'])
231+
env.Append(LINKFLAGS=['-framework', 'Cocoa', '-framework', 'Carbon', '-lz', '-framework', 'IOKit'])
233232

234233
env.Append(LIBS=['pthread'])
235234

0 commit comments

Comments
 (0)