diff options
| author | ruki <[email protected]> | 2018-02-05 22:41:02 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-02-05 10:06:15 +0800 |
| commit | f544576e010e2d37defa0592a7b5b919375bd2c3 (patch) | |
| tree | e078c08e92fd2255070e072e4c4c2fd9a73bb777 /xmake/core/tool/linker.lua | |
| parent | 3067eb2a3f6b8ebd34d719558a7f0dedc527d3fe (diff) | |
improve linker error tips
Diffstat (limited to 'xmake/core/tool/linker.lua')
| -rw-r--r-- | xmake/core/tool/linker.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/core/tool/linker.lua b/xmake/core/tool/linker.lua index be137b3fa..f17049838 100644 --- a/xmake/core/tool/linker.lua +++ b/xmake/core/tool/linker.lua @@ -115,16 +115,19 @@ function linker.load(targetkind, sourcekinds) -- select the linker local linkerinfo = nil local linkertool = nil + local firsterror = nil for _, _linkerinfo in ipairs(linkerinfos) do -- load the linker tool from the linker kind linkertool, errors = tool.load(_linkerinfo.linkerkind) if linkertool then linkerinfo = _linkerinfo break + else + firsterror = firsterror or errors end end if not linkerinfo then - return nil, errors + return nil, firsterror end -- get it directly from cache dirst |
