diff options
| author | ruki <[email protected]> | 2022-05-14 20:24:50 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-05-14 20:24:50 +0800 |
| commit | 59ef4006b44da3ee970c286fcfe5b49bc67cc54f (patch) | |
| tree | 4897415c65980ca8889933c174e29b7e242172fd | |
| parent | 6fd5bf28ad8fb2025f1930bb580be7448d4101c9 (diff) | |
improve progress
| -rw-r--r-- | xmake/modules/private/action/build/object.lua | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/xmake/modules/private/action/build/object.lua b/xmake/modules/private/action/build/object.lua index 3d68dcfa2..487be763a 100644 --- a/xmake/modules/private/action/build/object.lua +++ b/xmake/modules/private/action/build/object.lua @@ -26,6 +26,7 @@ import("core.project.depend") import("private.tools.ccache") import("private.async.runjobs") import("utils.progress") +import("private.service.distcc_build.client", {alias = "distcc_build_client"}) -- do build file function _do_build_file(target, sourcefile, opt) @@ -58,12 +59,17 @@ function _do_build_file(target, sourcefile, opt) -- is verbose? local verbose = option.get("verbose") - -- exists ccache? - local exists_ccache = ccache.exists() + -- exists ccache or distcc? + local prefix = "" + if distcc_build_client.is_distccjob() and distcc_build_client.singleton():has_freejobs() then + prefix = "distcc " + elseif ccache.exists() then + prefix = "ccache " + end -- trace progress info if not opt.quiet then - progress.show(opt.progress, "${color.build.object}%scompiling.$(mode) %s", exists_ccache and "ccache " or "", sourcefile) + progress.show(opt.progress, "${color.build.object}%scompiling.$(mode) %s", prefix, sourcefile) end -- trace verbose info |
