Skip to content

Commit

Permalink
fix archs for vs/vsxmake generator
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Sep 12, 2022
1 parent 0672eae commit 1bf418b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions xmake/plugins/project/vstudio/impl/vs201x.lua
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,9 @@ function _make_vsinfo_archs()
vsinfo_archs = allowed_archs:to_array()
end
end
if not vsinfo_archs then
vsinfo_archs = toolchain.load("msvc"):config("vcarchs")
end
if not vsinfo_archs then
vsinfo_archs = platform.archs()
end
Expand Down
4 changes: 4 additions & 0 deletions xmake/plugins/project/vsxmake/getinfo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import("core.project.project")
import("core.platform.platform")
import("core.tool.compiler")
import("core.tool.linker")
import("core.tool.toolchain")
import("core.cache.memcache")
import("core.cache.localcache")
import("lib.detect.find_tool")
Expand Down Expand Up @@ -287,6 +288,9 @@ function _make_vsinfo_archs()
vsinfo_archs = allowed_archs:to_array()
end
end
if not vsinfo_archs then
vsinfo_archs = toolchain.load("msvc"):config("vcarchs")
end
if not vsinfo_archs then
vsinfo_archs = platform.archs()
end
Expand Down
1 change: 1 addition & 0 deletions xmake/toolchains/msvc/check.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ function _check_vsenv(toolchain)

-- save vcvars
toolchain:config_set("vcvars", vcvars)
toolchain:config_set("vcarchs", table.orderkeys(vcvarsall))
toolchain:config_set("vs_toolset", vcvars.VCToolsVersion)
toolchain:config_set("vs_sdkver", vcvars.WindowsSDKVersion)

Expand Down

0 comments on commit 1bf418b

Please sign in to comment.