summaryrefslogtreecommitdiff
path: root/xmake/modules/detect/tools/link/has_flags.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-07-12 13:40:04 +0800
committerruki <[email protected]>2017-07-12 13:40:04 +0800
commitb470ddf3d3723a700a97f73f8599696d21198bfb (patch)
tree5a73e1b3022c303c2d60f8bcbeb0a1907eb71b85 /xmake/modules/detect/tools/link/has_flags.lua
parentf6688e9eaff8ce02c097ba4e1da27d9efd8ece90 (diff)
fix link.has_flags
Diffstat (limited to 'xmake/modules/detect/tools/link/has_flags.lua')
-rw-r--r--xmake/modules/detect/tools/link/has_flags.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/modules/detect/tools/link/has_flags.lua b/xmake/modules/detect/tools/link/has_flags.lua
index 01b2ef1dd..582f6ecf9 100644
--- a/xmake/modules/detect/tools/link/has_flags.lua
+++ b/xmake/modules/detect/tools/link/has_flags.lua
@@ -76,7 +76,8 @@ end
function _check_try_running(flags, opt)
-- make an stub source file
- local winmain = flags:lower():find("subsystem:windows")
+ local flags_str = table.concat(flags, " "):lower()
+ local winmain = flags_str:find("subsystem:windows")
local sourcefile = path.join(os.tmpdir(), "detect", ifelse(winmain, "winmain_", "") .. "link_has_flags.c")
if not os.isfile(sourcefile) then
if winmain then