summaryrefslogtreecommitdiff
path: root/xmake/modules/lib/detect/has_flags.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2025-09-18 23:26:15 +0800
committerruki <[email protected]>2025-09-18 23:26:15 +0800
commit0d6ab60fa9c7e77ae4819417d4f8145661c03d09 (patch)
tree7c60673ca70d2befb637071de2d9510cf3807f10 /xmake/modules/lib/detect/has_flags.lua
parentdd46b5b5089cfa1edda87347628c5e40e34b0efb (diff)
improve has_flags
Diffstat (limited to 'xmake/modules/lib/detect/has_flags.lua')
-rw-r--r--xmake/modules/lib/detect/has_flags.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/modules/lib/detect/has_flags.lua b/xmake/modules/lib/detect/has_flags.lua
index b122bcebb..36409ef84 100644
--- a/xmake/modules/lib/detect/has_flags.lua
+++ b/xmake/modules/lib/detect/has_flags.lua
@@ -53,8 +53,10 @@ function main(name, flags, opt)
opt.flagskey = opt.flagskey or table.concat(flags, " ")
opt.sysflags = table.wrap(opt.sysflags)
+ -- @note avoid running additional `program --version` processes
+ --opt.version = true
+
-- find tool program and version first
- opt.version = true
local tool = find_tool(name, opt)
if not tool then
return false
@@ -63,7 +65,7 @@ function main(name, flags, opt)
-- init tool
opt.toolname = tool.name
opt.program = tool.program
- opt.programver = tool.version
+ --opt.programver = tool.version
-- get tool platform
local plat = opt.plat or config.get("plat") or os.host()