diff options
Diffstat (limited to 'xmake/scripts')
| -rw-r--r-- | xmake/scripts/base/project.lua | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/xmake/scripts/base/project.lua b/xmake/scripts/base/project.lua index 1cd8b5f25..9e003a59d 100644 --- a/xmake/scripts/base/project.lua +++ b/xmake/scripts/base/project.lua @@ -653,31 +653,27 @@ end -- make option for checking links function project._make_option_for_checking_links(opt, links, cfile, objectfile, targetfile) - -- done - for _, link in ipairs(utils.wrap(links)) do - - -- this links has been checked? - project._CHECKED_LINKS = project._CHECKED_LINKS or {} - if project._CHECKED_LINKS[link] then return true end - - -- only for compile a object file - local ok = compiler.check_include(opt, nil, cfile, objectfile) - - -- check link - if ok then ok = linker.check_links(opt, link, objectfile, targetfile) end + -- the links string + local links_str = table.concat(utils.wrap(links), ", ") + + -- this links has been checked? + project._CHECKED_LINKS = project._CHECKED_LINKS or {} + if project._CHECKED_LINKS[links_str] then return true end + + -- only for compile a object file + local ok = compiler.check_include(opt, nil, cfile, objectfile) - -- trace - utils.verbose("checking for the link %s ... %s", link, utils.ifelse(ok, "ok", "no")) + -- check link + if ok then ok = linker.check_links(opt, links, objectfile, targetfile) end - -- cache the result - project._CHECKED_LINKS[link] = ok + -- trace + utils.verbose("checking for the links %s ... %s", links_str, utils.ifelse(ok, "ok", "no")) - -- failed - if not ok then return false end - end + -- cache the result + project._CHECKED_LINKS[links_str] = ok - -- ok - return true + -- ok? + return ok end -- make option for checking cincludes |
