diff options
| author | ruki <[email protected]> | 2022-09-16 23:04:18 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-09-16 23:04:18 +0800 |
| commit | ee6622a6f3b48ab4af7aa26f4d788dde25b705a8 (patch) | |
| tree | 65e1d39c5d4d61569c9ad2808b3dae796ac14521 /xmake/modules | |
| parent | e36f921d133c29dcd04065019c578cfe7f419fc3 (diff) | |
pass ios host machine to trybuild
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/private/action/trybuild/meson.lua | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/xmake/modules/private/action/trybuild/meson.lua b/xmake/modules/private/action/trybuild/meson.lua index 8c6882986..822f72e00 100644 --- a/xmake/modules/private/action/trybuild/meson.lua +++ b/xmake/modules/private/action/trybuild/meson.lua @@ -143,7 +143,27 @@ function _get_cross_file(buildir) -- host machine file:print("[host_machine]") if is_plat("iphoneos", "macosx") then - -- TODO + local cpu + local cpu_family + if is_arch("arm64") then + cpu = "aarch64" + cpu_family = "aarch64" + elseif is_arch("armv7") then + cpu = "arm" + cpu_family = "arm" + elseif is_arch("x64", "x86_64") then + cpu = "x86_64" + cpu_family = "x86_64" + elseif is_arch("x86", "i386") then + cpu = "i686" + cpu_family = "x86" + else + raise("unsupported arch(%s)", config.arch()) + end + file:print("system = 'darwin'") + file:print("cpu_family = '%s'", cpu_family) + file:print("cpu = '%s'", cpu) + file:print("endian = 'little'") elseif is_plat("android") then -- TODO elseif is_plat("mingw") then |
