summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/gcc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/core/tools/gcc.lua')
-rw-r--r--xmake/modules/core/tools/gcc.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index 38ad7c8fd..5418ecf27 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -21,6 +21,7 @@
-- imports
import("core.base.option")
import("core.base.colors")
+import("core.base.global")
import("core.project.config")
import("core.project.project")
import("core.language.language")
@@ -477,7 +478,7 @@ function compile(self, sourcefile, objectfile, dependinfo, flags)
{
function (ok, outdata, errdata)
-- show warnings?
- if ok and errdata and #errdata > 0 and (option.get("diagnosis") or option.get("warning")) then
+ 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, ifelse(#lines > 8, 8, #lines)), "\n")