summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/core/tools/gcc.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index 5baa9069d..224dc6c2d 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -500,7 +500,7 @@ 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
- if option.get("diagnosis") then
+ if not option.get("diagnosis") then
lines = table.slice(lines, 1, (#lines > 16 and 16 or #lines))
end
local warnings = table.concat(lines, "\n")