mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 01:06:00 +08:00
[godot] Fix iOS build error with Vulkan headers and C++ modules
Adds compiler flag -Wno-error=module-import-in-extern-c to suppress compilation errors when building for iOS with newer Xcode versions. The Vulkan headers include stdint.h inside extern "C" blocks, which conflicts with C++ modules. The fix is applied via a patch file during setup.sh execution.
This commit is contained in:
parent
368f46d68e
commit
2af04b6eee
14
spine-godot/build/ios-vulkan-fix.patch
Normal file
14
spine-godot/build/ios-vulkan-fix.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
diff --git a/platform/ios/detect.py b/platform/ios/detect.py
|
||||||
|
index 53b367a0a7..aea9424abe 100644
|
||||||
|
--- a/platform/ios/detect.py
|
||||||
|
+++ b/platform/ios/detect.py
|
||||||
|
@@ -144,6 +144,9 @@ def configure(env: "SConsEnvironment"):
|
||||||
|
# Temp fix for ABS/MAX/MIN macros in iOS SDK blocking compilation
|
||||||
|
env.Append(CCFLAGS=["-Wno-ambiguous-macro"])
|
||||||
|
|
||||||
|
+ # Fix for C++ module imports in extern "C" blocks in Vulkan headers
|
||||||
|
+ env.Append(CCFLAGS=["-Wno-error=module-import-in-extern-c"])
|
||||||
|
+
|
||||||
|
env.Prepend(
|
||||||
|
CPPPATH=[
|
||||||
|
"$IOS_SDK_PATH/usr/include",
|
||||||
@ -70,6 +70,14 @@ if [ "$branch" = "4.3-stable" ]; then
|
|||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Apply iOS Vulkan fix for C++ module imports in extern "C" blocks
|
||||||
|
# This fixes compilation errors with newer Xcode versions
|
||||||
|
pushd godot
|
||||||
|
if [ -f ../build/ios-vulkan-fix.patch ]; then
|
||||||
|
git apply ../build/ios-vulkan-fix.patch
|
||||||
|
fi
|
||||||
|
popd
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Generate compile_commands.json for IDE integration (only in dev mode)
|
# Generate compile_commands.json for IDE integration (only in dev mode)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user