summaryrefslogtreecommitdiff
path: root/xmake/modules/detect/tools/gcc/has_flags.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-08-04 22:57:53 +0800
committerruki <[email protected]>2022-08-04 22:57:53 +0800
commit86dc716cbc9bf052012383f4448a069aa2a0bcb8 (patch)
tree703d7bf5b6ba15016a22599148babce5f95d9935 /xmake/modules/detect/tools/gcc/has_flags.lua
parent339c50ca90f0f4fac4c8f3083386eb770f18f06a (diff)
improve has_flags
Diffstat (limited to 'xmake/modules/detect/tools/gcc/has_flags.lua')
-rw-r--r--xmake/modules/detect/tools/gcc/has_flags.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/modules/detect/tools/gcc/has_flags.lua b/xmake/modules/detect/tools/gcc/has_flags.lua
index f7cf1d29e..b8e63423a 100644
--- a/xmake/modules/detect/tools/gcc/has_flags.lua
+++ b/xmake/modules/detect/tools/gcc/has_flags.lua
@@ -101,10 +101,11 @@ end
function main(flags, opt)
-- is linker?
+ opt = opt or {}
local islinker = _islinker(flags, opt)
-- attempt to check it from the argument list
- if _check_from_arglist(flags, opt, islinker) then
+ if not opt.tryrun and _check_from_arglist(flags, opt, islinker) then
return true
end