The --no-lto option only works on GCC compilers. This breaks LTO builds
on MacOS and iPhone when building the gdnative wrappers.
-fno-lto works on both brands of compilers.
The GDNative C API gets passed to libraries in a struct of function
pointers. To provide stable binary compatibility, each extension not
part of the core API is separated into its own sub-struct.
These structs aren't meant to be changed in order to keep binary
compatibility.
In case of an API extension, the structs include a `next` pointer
which can point to a new struct with additional function pointers.
Godot's build system generates the API structs automatically at
build time, but so far there has no support for the mentioned `next`
pointers.
This commit changes the API struct generation in such a way that code
that used previous headers will compile without problem with the new
headers.
The new extension-extensions (weird name, but that's what it is) get
generated recursively and include the version in the struct-name.
Previously functions of the GDNative API were accessed by letting
the loader at load-time resolve the symbols. This causes troubles on
Windows (...sigh...), so now the GDNative API isn't exported anymore.
This means, that a library that wants to call a GDNative function
needs to access it via a struct of pointers that's passed to it at
right after the library was loaded. To make the usage easier, those
function pointers in the struct can be wrapped in actual function in
the global scope. This commit adds a generator for that wrapper code.
- The export process now builds complete .ipa on macOS, instead of just
creating XCode project.
- The project includes Capabilities games usually require: Game Center,
Push Notifications, In-App Purchase.
- Icons and launch screens can be specified in export preset.
The _init call was buggy anyway and in the end shouldn't be a
thing that's called via ClassDB, it should be something that's
language specific, so we leave this out for the bindings.
In the commit 66a7763 the SCsub file for GDNative was changed to
use a cloned environment, that bricked -rdynamic which needs to be
passed down to the linker, which didn't happen with the new env.