diff options
| author | ruki <[email protected]> | 2022-05-20 23:05:19 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-05-20 23:05:19 +0800 |
| commit | 6cf488d207c3009aba6319759a2cc2fb6aa7a405 (patch) | |
| tree | c61583cf363192611d4f0be291b9e1fbe8afd2ab /xmake/modules/private/action/build/object.lua | |
| parent | c6218b9b4cd17babf15fa46dbc65e895ace3e7d7 (diff) | |
| parent | d63ce0e016b58d03519f957d7ac9f36494c73486 (diff) | |
Merge pull request #2361 from xmake-io/buildcache
Add build cache instead of ccache
Diffstat (limited to 'xmake/modules/private/action/build/object.lua')
| -rw-r--r-- | xmake/modules/private/action/build/object.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xmake/modules/private/action/build/object.lua b/xmake/modules/private/action/build/object.lua index 487be763a..b8816f446 100644 --- a/xmake/modules/private/action/build/object.lua +++ b/xmake/modules/private/action/build/object.lua @@ -23,7 +23,7 @@ import("core.base.option") import("core.theme.theme") import("core.tool.compiler") import("core.project.depend") -import("private.tools.ccache") +import("private.cache.build_cache") import("private.async.runjobs") import("utils.progress") import("private.service.distcc_build.client", {alias = "distcc_build_client"}) @@ -61,11 +61,12 @@ function _do_build_file(target, sourcefile, opt) -- 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 + if build_cache.is_enabled() and build_cache.is_supported(sourcekind) then prefix = "ccache " end + if distcc_build_client.is_distccjob() and distcc_build_client.singleton():has_freejobs() then + prefix = prefix .. "distcc " + end -- trace progress info if not opt.quiet then |
