summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/detect/sdks/find_dia_sdk.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/modules/detect/sdks/find_dia_sdk.lua b/xmake/modules/detect/sdks/find_dia_sdk.lua
index 1f45587a1..e4796dda6 100644
--- a/xmake/modules/detect/sdks/find_dia_sdk.lua
+++ b/xmake/modules/detect/sdks/find_dia_sdk.lua
@@ -71,7 +71,7 @@ function _find_dia_sdk(sdkdir, opt)
end
-- get arch
- local arch = opt.arch or config.get("arch") or "x64"
+ local arch = opt.arch or config.get("arch") or os.arch()
if arch then
local supported_arch = {
x64 = "amd64",
@@ -132,7 +132,7 @@ function main(sdkdir, opt)
if VSInstallDir then
dia_sdk = _find_dia_sdk(VSInstallDir, opt)
if dia_sdk then
- break
+ goto find
end
end
end
@@ -141,6 +141,8 @@ function main(sdkdir, opt)
end
end
+::find::
+
if dia_sdk then
if opt.verbose or option.get("verbose") then
cprint("checking for DIA SDK directory ... ${color.success}%s", dia_sdk.sdkdir)