diff options
| author | ruki <[email protected]> | 2022-09-16 09:42:53 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-09-16 09:42:53 +0800 |
| commit | 6a5df1918f558f6824b85b1c7562d580b4b4205f (patch) | |
| tree | 5ce0d43b0c73419bc4f3fee0d5f6232d9938c213 | |
| parent | 4c72cd24746d6a784a6e035513f9aa0aad87060d (diff) | |
add mingw host for meson
| -rw-r--r-- | xmake/modules/package/tools/meson.lua | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/meson.lua b/xmake/modules/package/tools/meson.lua index b2c4d4a3e..f23b399cd 100644 --- a/xmake/modules/package/tools/meson.lua +++ b/xmake/modules/package/tools/meson.lua @@ -156,7 +156,21 @@ function _get_cross_file(package, opt) elseif package:is_plat("android") then -- TODO elseif package:is_plat("mingw") then - -- TODO + local cpu + local cpu_family + if package:is_arch("x64", "x86_64") then + cpu = "x86_64" + cpu_family = "x86_64" + elseif package:is_arch("x86", "i386") then + cpu = "i686" + cpu_family = "x86" + else + raise("unsupprted arch(%s)", package:arch()) + end + file:print("system = 'windows'") + file:print("cpu_family = '%s'", cpu_family) + file:print("cpu = '%s'", cpu) + file:print("endian = 'little'") elseif package:is_plat("cross") and package:targetos() then local cpu = package:arch() if package:is_arch("arm64") then |
