summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorstar9029 <[email protected]>2025-05-23 23:44:52 +0800
committerstar9029 <[email protected]>2025-05-23 23:44:52 +0800
commite4d52557f6e5c244ace04a8b2c04549d67b22bf5 (patch)
tree1cba4f8fdfeff2a64ccf73e6ff5b5c0b330aafe7 /xmake/modules
parent57557665cfc6e1630f2687324f95126737f9f0c9 (diff)
Improve flow control
Diffstat (limited to 'xmake/modules')
-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)