summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/gcc.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2021-10-30 22:20:42 +0800
committerGitHub <[email protected]>2021-10-30 22:20:42 +0800
commitc3384d3f1927eee53ebb8d94ed764e8de7ddc212 (patch)
tree1c9e3d5f46f332b91a6badf2eb9850ab95bcbd95 /xmake/modules/core/tools/gcc.lua
parentb876a04a87a87db33f427ff894ae74a2431d5299 (diff)
Update gcc.lua
Diffstat (limited to 'xmake/modules/core/tools/gcc.lua')
-rw-r--r--xmake/modules/core/tools/gcc.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index 2e93ea2bb..5baa9069d 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -500,7 +500,10 @@ function compile(self, sourcefile, objectfile, dependinfo, flags)
if ok and errdata and #errdata > 0 and (option.get("diagnosis") or option.get("warning") or global.get("build_warning")) then
local lines = errdata:split('\n', {plain = true})
if #lines > 0 then
- local warnings = table.concat(table.slice(lines, 1, (#lines > 8 and 8 or #lines)), "\n")
+ if option.get("diagnosis") then
+ lines = table.slice(lines, 1, (#lines > 16 and 16 or #lines))
+ end
+ local warnings = table.concat(lines, "\n")
if progress.showing_without_scroll() then
print("")
end