summaryrefslogtreecommitdiff
path: root/xmake/plugins/project/vstudio/impl/vs201x.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2021-07-23 00:43:55 +0800
committerruki <[email protected]>2021-07-23 00:43:55 +0800
commit6fddc9c0d0532e5f66be3e9713498638496ffe7f (patch)
tree5d9799ee97c421d966d2391c73eed9f135ab8a3e /xmake/plugins/project/vstudio/impl/vs201x.lua
parent049460cc578b7d74b99ef3cffe3fe1d3e9eb6439 (diff)
improve allowed archs
Diffstat (limited to 'xmake/plugins/project/vstudio/impl/vs201x.lua')
-rw-r--r--xmake/plugins/project/vstudio/impl/vs201x.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/xmake/plugins/project/vstudio/impl/vs201x.lua b/xmake/plugins/project/vstudio/impl/vs201x.lua
index a66761d4d..da0dd9317 100644
--- a/xmake/plugins/project/vstudio/impl/vs201x.lua
+++ b/xmake/plugins/project/vstudio/impl/vs201x.lua
@@ -212,7 +212,17 @@ function _make_vsinfo_archs()
end
else
-- we use it first if global set_arch("xx") is setted in xmake.lua
- vsinfo_archs = project.get("target.arch") or platform.archs()
+ vsinfo_archs = project.get("target.arch")
+ if not vsinfo_archs then
+ -- for set_allowedarchs()
+ local allowed_archs = project.allowed_archs(config.plat())
+ if allowed_archs then
+ vsinfo_archs = allowed_archs:to_array()
+ end
+ end
+ if not vsinfo_archs then
+ vsinfo_archs = platform.archs()
+ end
end
if not vsinfo_archs or #vsinfo_archs == 0 then
vsinfo_archs = { config.arch() }