Needed for macOS when using Xcode 16 and clang 16. This version of clang produces errors like this when compiling harfbuzz:
cast from 'void (*)(FT_Face)' (aka 'void (*)(FT_FaceRec_ *)') to 'FT_Generic_Finalizer' (aka 'void (*)(void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
This is the minimum version of harfbuzz that fixes the errors. We could certainly consider upgrading further (current release is 10.0.1 at the time of this commit).
On ios, we build statically linked executables. This means that if lime uses mbedtls 3, hxcpp is also forced to use it which can cause crashes and other problems, as hxcpp is currently written for 2.28
These files are only required if `PNG_ARM_NEON_IMPLEMENTATION == 1` (the default). Since we can't test it here, we just have to assume it's the case on all Arm devices. (But only Arm devices.)
As noted in pngpriv.h, the alternative (assembly code) doesn't currently
work on arm64.
There's no mention of iOS or tvOS, so maybe we could remove those?
Overriding headers has always been risky, and finally we see why.
Apparently on iOS, files may be compiled in such a way that the original
SDL_config.h file is included, not Lime's custom one. It's hard to do
anything more than we've already done to manage include order, so we
need to find another option.
One such option is to make the two files as similar as possible, such
that it usually doesn't matter which one ends up being included. Then we
only set `USING_GENERATED_CONFIG_H` when it really matters.
SDL_cocoavideo.m now enforces this, as of this commit:
ec8fa57750
That commit also removed the destructors from SDL_render_metal.m, which
implies it's required on iOS too.
And before anyone asks, SDL seems to have no plans to back down on this.