From b470ddf3d3723a700a97f73f8599696d21198bfb Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 12 Jul 2017 13:40:04 +0800 Subject: fix link.has_flags --- xmake/modules/detect/tools/link/has_flags.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.3.1