diff options
| -rw-r--r-- | xmake/platforms/wasm/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/qt/load.lua | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/xmake/platforms/wasm/xmake.lua b/xmake/platforms/wasm/xmake.lua index 8e794b9e7..e9c3bc1f8 100644 --- a/xmake/platforms/wasm/xmake.lua +++ b/xmake/platforms/wasm/xmake.lua @@ -28,7 +28,7 @@ platform("wasm") set_hosts("macosx", "linux", "windows", "bsd") -- set archs - set_archs("wasm32") + set_archs("wasm32", "wasm64") -- set formats set_formats("static", "lib$(name).a") diff --git a/xmake/rules/qt/load.lua b/xmake/rules/qt/load.lua index 6aff4a2dc..40128a667 100644 --- a/xmake/rules/qt/load.lua +++ b/xmake/rules/qt/load.lua @@ -408,11 +408,15 @@ function main(target, opt) end end target:add("ldflags", "-s WASM=1", "-s FETCH=1", "-s FULL_ES2=1", "-s FULL_ES3=1", "-s USE_WEBGL2=1", "--bind") - target:add("ldflags", "-s ERROR_ON_UNDEFINED_SYMBOLS=1", "-s EXPORTED_RUNTIME_METHODS=[\"UTF16ToString\",\"stringToUTF16\"]", "-s ALLOW_MEMORY_GROWTH=1") + target:add("ldflags", "-s ERROR_ON_UNDEFINED_SYMBOLS=1", + "-s EXPORTED_RUNTIME_METHODS=[\"UTF16ToString\",\"stringToUTF16\"]", + "-s ALLOW_MEMORY_GROWTH=1") target:add("shflags", "-s WASM=1", "-s FETCH=1", "-s FULL_ES2=1", "-s FULL_ES3=1", "-s USE_WEBGL2=1", "--bind") - target:add("shflags", "-s ERROR_ON_UNDEFINED_SYMBOLS=1", "-s EXPORTED_RUNTIME_METHODS=[\"UTF16ToString\",\"stringToUTF16\"]", "-s ALLOW_MEMORY_GROWTH=1") - -- @see https://github.com/xmake-io/xmake/issues/4137 + target:add("shflags", "-s ERROR_ON_UNDEFINED_SYMBOLS=1", + "-s EXPORTED_RUNTIME_METHODS=[\"UTF16ToString\",\"stringToUTF16\"]", + "-s ALLOW_MEMORY_GROWTH=1") if qt_sdkver:ge("6.0") then + -- @see https://github.com/xmake-io/xmake/issues/4137 target:add("ldflags", "-s MODULARIZE=1", "-s EXPORT_NAME=createQtAppInstance") end end |
