summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-02-06 22:40:26 +0800
committerruki <[email protected]>2024-02-06 22:40:26 +0800
commitb8c2e1315d46944e72fdaa0b23eb96c34361bfa3 (patch)
treef51a57ec8e3610cbbf65fb4d6d6115e91e882c8b
parent141b1ba725ea1d7e0f6a87a673db6b97b335d718 (diff)
improve has_flags
-rw-r--r--xmake/modules/detect/tools/cosmocc/has_flags.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/detect/tools/cosmocc/has_flags.lua b/xmake/modules/detect/tools/cosmocc/has_flags.lua
index 8f3895080..8ff8fa1ff 100644
--- a/xmake/modules/detect/tools/cosmocc/has_flags.lua
+++ b/xmake/modules/detect/tools/cosmocc/has_flags.lua
@@ -64,7 +64,7 @@ function _check_from_arglist(flags, opt, islinker)
local allflags = detectcache:get2(key, flagskey)
if not allflags then
allflags = {}
- local arglist = try {function () return os.iorunv(opt.program, {islinker and "-Wl,--help" or "--help"}, {envs = opt.envs}) end}
+ local arglist = try {function () return os.iorunv(opt.program, {islinker and "-Wl,--help" or "--help"}, {envs = opt.envs, shell = true}) end}
if arglist then
for arg in arglist:gmatch("%s+(%-[%-%a%d]+)%s+") do
allflags[arg] = true