From 2aa699bb2c0e7e031ea7cfe98b0e60ff9eae073b Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 28 Oct 2020 22:42:47 +0800 Subject: add global build_warning option --- xmake/modules/core/tools/tcc.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xmake/modules/core/tools/tcc.lua') diff --git a/xmake/modules/core/tools/tcc.lua b/xmake/modules/core/tools/tcc.lua index a9f8fd4f8..271792ffe 100644 --- a/xmake/modules/core/tools/tcc.lua +++ b/xmake/modules/core/tools/tcc.lua @@ -20,6 +20,7 @@ -- imports import("core.base.option") +import("core.base.global") import("core.project.config") import("core.project.project") import("core.language.language") @@ -185,7 +186,7 @@ function _compile1(self, sourcefile, objectfile, dependinfo, flags) function (ok, warnings) -- print some warnings - if warnings and #warnings > 0 and (option.get("verbose") or option.get("warning")) then + if warnings and #warnings > 0 and (option.get("verbose") or option.get("warning") or global.get("build_warning")) then cprint("${color.warning}%s", table.concat(table.slice(warnings:split('\n'), 1, 8), '\n')) end end -- cgit v1.3.1