summaryrefslogtreecommitdiff
path: root/xmake/modules/private/action/build/object.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-09-06 22:38:17 +0800
committerruki <[email protected]>2019-09-06 09:49:43 +0800
commite5152e174154dde4f9fdd3f49047f36c0966d7ea (patch)
treeabd39a906a05aa856dbb18b4813d9181ae8a1fdd /xmake/modules/private/action/build/object.lua
parentcfb90668f507c9b93fa3e53f78f8f46cdb136413 (diff)
impl clang modules
Diffstat (limited to 'xmake/modules/private/action/build/object.lua')
-rw-r--r--xmake/modules/private/action/build/object.lua14
1 files changed, 8 insertions, 6 deletions
diff --git a/xmake/modules/private/action/build/object.lua b/xmake/modules/private/action/build/object.lua
index 7201185ff..209d99bfe 100644
--- a/xmake/modules/private/action/build/object.lua
+++ b/xmake/modules/private/action/build/object.lua
@@ -56,11 +56,13 @@ function _do_build_file(target, sourcefile, opt)
local exists_ccache = ccache.exists()
-- trace progress info
- cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", progress)
- if verbose then
- cprint("${dim color.build.object}%scompiling.$(mode) %s", exists_ccache and "ccache " or "", sourcefile)
- else
- cprint("${color.build.object}%scompiling.$(mode) %s", exists_ccache and "ccache " or "", sourcefile)
+ if not opt.quiet then
+ cprintf("${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} ", progress)
+ if verbose then
+ cprint("${dim color.build.object}%scompiling.$(mode) %s", exists_ccache and "ccache " or "", sourcefile)
+ else
+ cprint("${color.build.object}%scompiling.$(mode) %s", exists_ccache and "ccache " or "", sourcefile)
+ end
end
-- trace verbose info
@@ -97,7 +99,7 @@ function _build_object(target, sourcebatch, index, opt)
local progress_now = progress.start + ((index - 1) * (progress.stop - progress.start)) / #sourcebatch.sourcefiles
-- init build option
- local opt = {objectfile = objectfile, dependfile = dependfile, sourcekind = sourcekind, progress = progress_now, configs = opt.configs}
+ local opt = table.join(opt, {objectfile = objectfile, dependfile = dependfile, sourcekind = sourcekind, progress = progress_now})
-- do before build
local before_build_file = target:script("build_file_before")