修复 Godot 原生插件的 MSVC 编译兼容性
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Failing after 17s
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Failing after 18s
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Failing after 18s
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Failing after 19s
Project CI / AI game creator shell Rust smoke (pull_request) Failing after 17s
Project CI / AI game creator shell Rust crates (pull_request) Failing after 16s
Project CI / Native shell tests (pull_request) Failing after 15s
Project CI / Backend tests (pull_request) Failing after 16s
Project CI / Frontend tests (pull_request) Failing after 6s
Project CI / AI game creator shell web tests (pull_request) Failing after 12s
Project CI / Repository checks (pull_request) Failing after 12s
Project CI / AI game creator shell Rust shard 1/4 (push) Failing after 19s
Project CI / AI game creator shell Rust shard 3/4 (push) Failing after 19s
Project CI / AI game creator shell Rust shard 4/4 (push) Failing after 19s
Project CI / AI game creator shell Rust shard 2/4 (push) Failing after 19s
Project CI / AI game creator shell Rust crates (push) Failing after 20s
Project CI / AI game creator shell Rust smoke (push) Failing after 20s
Project CI / Backend tests (push) Failing after 20s
Project CI / Native shell tests (push) Failing after 19s
Project CI / Frontend tests (push) Failing after 6s
Project CI / AI game creator shell web tests (push) Failing after 12s
Project CI / Repository checks (push) Failing after 12s

将 ABI 存储改为 C11 显式 16 字节对齐并保留 128 字节容量
补充 Windows 编译环境要求与 MSVC 对齐问题排障说明
This commit was merged in pull request #435.
This commit is contained in:
2026-09-20 19:39:12 +08:00
parent cde34428f9
commit a2acfa9a6f
3 changed files with 10 additions and 2 deletions
@@ -9,9 +9,10 @@
#include "gdextension_interface.h"
#include "embedded_bridge.h"
/* Windows x64 ABI storage is deliberately oversized and naturally aligned.
/* Windows x64 ABI storage is deliberately oversized and 16-byte aligned.
* Explicit C11 alignment also works with MSVC C, which lacks max_align_t.
* Objects are constructed/destructed solely through the official interface. */
typedef union { max_align_t alignment; unsigned char bytes[128]; } Storage;
typedef struct { _Alignas(16) unsigned char bytes[128]; } Storage;
static GDExtensionInterfacePrintWarning api_warning;
static GDExtensionInterfaceVariantCall api_call;
static GDExtensionInterfaceVariantDestroy api_destroy;