summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/cmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2025-08-14 23:34:11 +0800
committerruki <[email protected]>2025-08-14 23:34:11 +0800
commitb8004a43689fcdb39bdd5470b3e5271e93c64963 (patch)
tree5ebae20cdd42e9d9e796f0ec877a51b27a9bb5a5 /xmake/modules/package/tools/cmake.lua
parent7ab1594d2578a0b31d0d09ed2ac813a8be0ee680 (diff)
support for wasm64 #6690
Diffstat (limited to 'xmake/modules/package/tools/cmake.lua')
-rw-r--r--xmake/modules/package/tools/cmake.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index eb0d85440..21eed5392 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -633,6 +633,15 @@ function _get_configs_for_wasm(package, configs, opt)
end
end
+ -- pass toolchain flags cross-compilation
+ -- @see https://github.com/xmake-io/xmake/issues/6690
+ envs.CMAKE_C_FLAGS = _get_cflags(package, {cross = true})
+ envs.CMAKE_CXX_FLAGS = _get_cxxflags(package, {cross = true})
+ envs.CMAKE_ASM_FLAGS = _get_asflags(package, {cross = true})
+ envs.CMAKE_EXE_LINKER_FLAGS = _get_ldflags(package, {cross = true})
+ envs.CMAKE_SHARED_LINKER_FLAGS = _get_shflags(package, {cross = true})
+ envs.CMAKE_MODULE_LINKER_FLAGS = _get_shflags(package, {cross = true})
+
-- avoid find and add system include/library path
-- @see https://github.com/xmake-io/xmake/issues/5577
-- https://github.com/emscripten-core/emscripten/issues/13310