diff options
| author | ruki <[email protected]> | 2022-10-29 22:22:20 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-10-29 22:22:33 +0800 |
| commit | b3f903777bfde99b9d69aaa2183175d3babe289b (patch) | |
| tree | 1e1cdad3ff474caf3e8488863b280a5f573dbf3c /xmake/plugins | |
| parent | 2dcbc30142e15588356974067c36e377c72b7dd1 (diff) | |
improve vs/vsxmake project generator
Diffstat (limited to 'xmake/plugins')
| -rw-r--r-- | xmake/plugins/project/vstudio/impl/vs201x.lua | 14 | ||||
| -rw-r--r-- | xmake/plugins/project/vsxmake/getinfo.lua | 13 |
2 files changed, 19 insertions, 8 deletions
diff --git a/xmake/plugins/project/vstudio/impl/vs201x.lua b/xmake/plugins/project/vstudio/impl/vs201x.lua index aad60542d..4c4f2a8e4 100644 --- a/xmake/plugins/project/vstudio/impl/vs201x.lua +++ b/xmake/plugins/project/vstudio/impl/vs201x.lua @@ -21,6 +21,7 @@ -- imports import("core.base.option") import("core.base.colors") +import("core.base.hashset") import("core.project.rule") import("core.project.config") import("core.project.project") @@ -470,10 +471,15 @@ function _make_vsinfo_archs() end end if not vsinfo_archs then - vsinfo_archs = toolchain.load("msvc"):config("vcarchs") - end - if not vsinfo_archs then - vsinfo_archs = platform.archs() + local default_archs = toolchain.load("msvc"):config("vcarchs") + if not default_archs then + default_archs = platform.archs() + end + if default_archs then + default_archs = hashset.from(table.wrap(default_archs)) + default_archs:remove("arm64") + vsinfo_archs = default_archs:to_array() + end end end if not vsinfo_archs or #vsinfo_archs == 0 then diff --git a/xmake/plugins/project/vsxmake/getinfo.lua b/xmake/plugins/project/vsxmake/getinfo.lua index b13900690..59ad0ce02 100644 --- a/xmake/plugins/project/vsxmake/getinfo.lua +++ b/xmake/plugins/project/vsxmake/getinfo.lua @@ -257,10 +257,15 @@ function _make_vsinfo_archs() end end if not vsinfo_archs then - vsinfo_archs = toolchain.load("msvc"):config("vcarchs") - end - if not vsinfo_archs then - vsinfo_archs = platform.archs() + local default_archs = toolchain.load("msvc"):config("vcarchs") + if not default_archs then + default_archs = platform.archs() + end + if default_archs then + default_archs = hashset.from(table.wrap(default_archs)) + default_archs:remove("arm64") + vsinfo_archs = default_archs:to_array() + end end end if not vsinfo_archs or #vsinfo_archs == 0 then |
