godot/platform
Alexandru Croitor 3624644630 Pass -isysroot to compiler / linker when doing a macOS build
Previously the compiler would use system headers located at
/System/Library/Frameworks, which could result in compilation failures
due to the headers not always being up-to-date in regards to the
latest installed macOS SDK headers that come with Xcode.

Fix the issue by passing the SDK path via the -isysroot option to the
compiler and linker invocations.

If no custom SDK path is given, the build system queries the SDK path
via xcrun --show-sdk-path, which returns something similar to

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/
 /Developer/SDKs/MacOSX.sdk/

Querying via xcrun is now also done for iphone (and simulator)
platforms as well.

Here is an example of a compilation failure message due to outdated
headers:

platform/osx/os_osx.mm:1421:41: error: use of undeclared identifier 'NSAppKitVersionNumber10_12'; did you mean 'NSAppKitVersionNumber'?
                                if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_12) {
                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                    NSAppKitVersionNumber
/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:26:28: note: 'NSAppKitVersionNumber' declared here
2018-08-27 18:01:05 +02:00
..
android Merge pull request #21387 from hpvb/fix-15324 2018-08-27 16:54:22 +02:00
haiku Rebase patches for fixing haiku build. 2018-08-11 17:20:51 +02:00
iphone Pass -isysroot to compiler / linker when doing a macOS build 2018-08-27 18:01:05 +02:00
javascript Fall back to GLES2 if GLES3 is not working 2018-08-26 16:40:46 +02:00
osx Pass -isysroot to compiler / linker when doing a macOS build 2018-08-27 18:01:05 +02:00
server Fix some more build issues after c69de2ba4 2018-07-20 11:56:18 +02:00
uwp Fall back to GLES2 if GLES3 is not working 2018-08-26 16:40:46 +02:00
windows Revert "Try closing gracefully before terminating process" 2018-08-27 17:32:43 +02:00
x11 Merge pull request #21387 from hpvb/fix-15324 2018-08-27 16:54:22 +02:00
register_platform_apis.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
SCsub Running builder (content generator) functions in subprocesses on Windows 2018-07-27 21:37:55 +02:00