summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools
diff options
context:
space:
mode:
authorruki <[email protected]>2017-08-03 09:09:17 +0800
committerruki <[email protected]>2017-08-03 09:09:17 +0800
commitb40bc697d9ce4e20836b60941daabfeaae080b28 (patch)
tree86109ca26675a9b11af1c8d0745369b9e79b7a8c /xmake/modules/core/tools
parentc69cae38fc5dd742bec1931177f978b8cab7182d (diff)
improve errors tips
Diffstat (limited to 'xmake/modules/core/tools')
-rw-r--r--xmake/modules/core/tools/gcc.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index 7fbe4aa3e..4d63e4837 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -400,6 +400,14 @@ function _compile1(self, sourcefile, objectfile, depinfo, flags)
-- try removing the old object file for forcing to rebuild this source file
os.tryrm(objectfile)
+ -- get last 16 lines
+ if not option.get("verbose") then
+ local lines = errors:split("\n")
+ if #lines > 32 then
+ errors = table.concat(table.slice(lines, #lines - 16), "\n")
+ end
+ end
+
-- raise compiling errors
os.raise(errors)
end