diff --git a/utils.py b/utils.py index dcc2d08..389545b 100644 --- a/utils.py +++ b/utils.py @@ -49,5 +49,7 @@ def download_wasmer(env, force=False, version=VERSION_DEFAULT): elif env["platform"] == "windows": if env.get("use_mingw"): download_tarfile(BASE_URL.format(version, "windows-gnu64"), "wasmer") + # Temporary workaround for https://github.com/ashtonmeuser/godot-wasm/issues/26 + os.system("patch -p1 < wasm-mingw.patch") else: download_tarfile(BASE_URL.format(version, "windows-amd64"), "wasmer") diff --git a/wasm-mingw.patch b/wasm-mingw.patch new file mode 100644 index 0000000..64db9d6 --- /dev/null +++ b/wasm-mingw.patch @@ -0,0 +1,26 @@ +diff --git a/wasmer/include/wasm.h b/wasmer/include/wasm.h +index 0873193..54cee8f 100644 +--- a/wasmer/include/wasm.h ++++ b/wasmer/include/wasm.h +@@ -10,7 +10,7 @@ + #include + + #ifndef WASM_API_EXTERN +-#ifdef _WIN32 ++#if defined(_WIN32) && !defined(__MINGW32__) + #define WASM_API_EXTERN __declspec(dllimport) + #else + #define WASM_API_EXTERN +diff --git a/wasmer/include/wasm.hh b/wasmer/include/wasm.hh +index f0b3ee2..a344e24 100644 +--- a/wasmer/include/wasm.hh ++++ b/wasmer/include/wasm.hh +@@ -12,7 +12,7 @@ + #include + + #ifndef WASM_API_EXTERN +-#ifdef _WIN32 ++#if defined(_WIN32) && !defined(__MINGW32__) + #define WASM_API_EXTERN __declspec(dllimport) + #else + #define WASM_API_EXTERN