diff options
| author | ruki <[email protected]> | 2017-06-20 14:09:27 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-06-20 14:09:27 +0800 |
| commit | ace13f7594d5dbddd771cfe0a4004bbcb506b11c (patch) | |
| tree | 4219dddb0e050b3efc898297baa628992cc128a0 /xmake/modules/detect/tools/gcc | |
| parent | a4a011d5147d15c424b6a01633b33b9d8d11a4ff (diff) | |
add cl.has_flag
Diffstat (limited to 'xmake/modules/detect/tools/gcc')
| -rw-r--r-- | xmake/modules/detect/tools/gcc/has_flag.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/modules/detect/tools/gcc/has_flag.lua b/xmake/modules/detect/tools/gcc/has_flag.lua index af00b84d8..8b1f691ef 100644 --- a/xmake/modules/detect/tools/gcc/has_flag.lua +++ b/xmake/modules/detect/tools/gcc/has_flag.lua @@ -41,6 +41,11 @@ end -- attempt to check it from the argument list of gcc function _check_from_arglist(flag, opt, islinker) + -- only for compiler + if islinker then + return + end + -- make cache key local key = "detect.tools.gcc.has_flag" @@ -58,7 +63,7 @@ function _check_from_arglist(flag, opt, islinker) flags = {} local arglist = os.iorunv(opt.program, {"--help"}) if arglist then - for arg in arglist:gmatch("%s+(%-[%-%a]+)%s+") do + for arg in arglist:gmatch("%s+(%-[%-%a%d]+)%s+") do flags[arg] = true end end |
