summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-09-17 00:44:51 +0800
committerruki <[email protected]>2022-09-17 00:44:51 +0800
commit8b92c6c380aa22e5e6b94f97500e343bebb48b9b (patch)
tree1c79468ec16e72e159a45ff570166d5945d06813
parent602cb0444b8005fb4f9926bd14f209e103c0d2e9 (diff)
add wasm for meson
-rw-r--r--xmake/modules/package/tools/meson.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/modules/package/tools/meson.lua b/xmake/modules/package/tools/meson.lua
index 38f31d00a..c3a85b89e 100644
--- a/xmake/modules/package/tools/meson.lua
+++ b/xmake/modules/package/tools/meson.lua
@@ -197,6 +197,11 @@ function _get_cross_file(package, opt)
file:print("cpu_family = '%s'", cpu_family)
file:print("cpu = '%s'", cpu)
file:print("endian = 'little'")
+ elseif package:is_plat("wasm") then
+ file:print("system = 'emscripten'")
+ file:print("cpu_family = 'wasm32'")
+ file:print("cpu = 'wasm32'")
+ file:print("endian = 'little'")
elseif package:is_plat("cross") and package:targetos() then
local cpu = package:arch()
if package:is_arch("arm64") then