summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/plugins/project/vstudio/impl/vs201x.lua12
-rw-r--r--xmake/plugins/project/vsxmake/getinfo.lua12
2 files changed, 22 insertions, 2 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() }
diff --git a/xmake/plugins/project/vsxmake/getinfo.lua b/xmake/plugins/project/vsxmake/getinfo.lua
index 407e4cbe4..965e55028 100644
--- a/xmake/plugins/project/vsxmake/getinfo.lua
+++ b/xmake/plugins/project/vsxmake/getinfo.lua
@@ -262,7 +262,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() }