diff options
| author | ruki <[email protected]> | 2022-05-18 22:26:12 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-05-18 13:09:42 +0800 |
| commit | f4a709d728f700689c56dc7cd0f66a9bed76e83a (patch) | |
| tree | 8eb2086b7f0726b0d8c342c3baf7e65216fb261a | |
| parent | 05b98d524b5b524683c6f59c1b59a0bab088b1dc (diff) | |
improve cache prefix
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 3 | ||||
| -rw-r--r-- | xmake/modules/private/action/build/object.lua | 9 |
2 files changed, 6 insertions, 6 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 7b198a217..710b6ef5c 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -26,7 +26,6 @@ import("core.base.global") import("core.project.config") import("core.project.project") import("core.language.language") -import("private.tools.ccache") import("utils.progress") import("private.cache.build_cache") import("private.service.distcc_build.client", {alias = "distcc_build_client"}) @@ -473,7 +472,7 @@ function compargv(self, sourcefile, objectfile, flags) if (extension:startswith(".h") or extension == ".inl") then return _compargv_pch(self, sourcefile, objectfile, flags) end - return ccache.cmdargv(self:program(), table.join("-c", flags, "-o", objectfile, sourcefile)) + return self:program(), table.join("-c", flags, "-o", objectfile, sourcefile) end -- compile the source file 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 |
