summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-08-28 22:17:44 +0800
committerruki <[email protected]>2022-08-28 22:17:44 +0800
commitd08a04653479ef0f4f503412552aabe4b50c7b09 (patch)
treee947e70bd2c44c1baf6d881b930e91aac3b4d8ef
parent2cfd0fe1d5184a247fbeec988583a4922a324cbc (diff)
load armv6 vavars
-rw-r--r--xmake/modules/detect/sdks/find_vstudio.lua13
1 files changed, 12 insertions, 1 deletions
diff --git a/xmake/modules/detect/sdks/find_vstudio.lua b/xmake/modules/detect/sdks/find_vstudio.lua
index 9bc4cdc51..37568a24d 100644
--- a/xmake/modules/detect/sdks/find_vstudio.lua
+++ b/xmake/modules/detect/sdks/find_vstudio.lua
@@ -320,7 +320,18 @@ function _find_vstudio(opt)
-- load vcvarsall
local vcvarsall_x86 = _load_vcvarsall(vcvarsall, version, "x86", opt)
local vcvarsall_x64 = _load_vcvarsall(vcvarsall, version, "x64", opt)
- local vcvarsall_arm64 = _load_vcvarsall(vcvarsall, version, "arm64", opt)
+
+ -- load vcvarsall for arm64
+ local arch
+ local arch_os = os.arch()
+ if arch_os == "x64" then
+ arch = "x64_arm64"
+ elseif arch_os == "x86" then
+ arch = "x86_arm64"
+ elseif arch_os == "arm64" then
+ arch = "arm64"
+ end
+ local vcvarsall_arm64 = arch and _load_vcvarsall(vcvarsall, version, arch, opt) or nil
-- save results
results[vsvers[version]] = {version = version, vcvarsall_bat = vcvarsall, vcvarsall = {x86 = vcvarsall_x86, x64 = vcvarsall_x64, arm64 = vcvarsall_arm64}}