summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-05-19 23:20:40 +0800
committerruki <[email protected]>2022-05-19 23:20:40 +0800
commit3024730a94c340390213c79dc6d810ece1e28500 (patch)
treed48606f8c16fc85d680ef887c0f4cd7858da8c6a
parent5669a698e75cce650e4753d6203697423c2ec67e (diff)
remove logs
-rw-r--r--xmake/modules/core/tools/cl.lua11
-rw-r--r--xmake/modules/core/tools/gcc.lua3
2 files changed, 2 insertions, 12 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua
index 41fbcd92b..dfa73cebd 100644
--- a/xmake/modules/core/tools/cl.lua
+++ b/xmake/modules/core/tools/cl.lua
@@ -470,22 +470,13 @@ function _compile(self, sourcefile, objectfile, compflags, opt)
preprocess = _preprocess, tool = self, target = opt.target})
elseif build_cache.is_enabled() and build_cache.is_supported(self:kind()) then
local program, argv = compargv(self, sourcefile, objectfile, compflags, table.join(opt, {rawargs = true}))
- local dt = os.mclock()
cppinfo = _preprocess(program, argv, {envs = self:runenvs(), target = opt.target})
- print("preprocess", os.mclock() - dt)
if cppinfo then
- local cachekey
- dt = os.mclock()
- cachekey = build_cache.cachekey(program, cppinfo.cppfile, cppinfo.cppflags, self:runenvs())
- print("cachekey", os.mclock() - dt)
- dt = os.mclock()
+ local cachekey = build_cache.cachekey(program, cppinfo.cppfile, cppinfo.cppflags, self:runenvs())
local objectfile_cached = build_cache.get(cachekey)
if objectfile_cached then
-
os.cp(objectfile_cached, cppinfo.objectfile)
- print("get", os.mclock() - dt)
else
- print("put")
vstool.iorunv(program, winos.cmdargv(table.join(cppinfo.cppflags, "-Fo" .. cppinfo.objectfile, cppinfo.cppfile)), {envs = self:runenvs()})
if cachekey then
build_cache.put(cachekey, cppinfo.objectfile)
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index 2c1e7f79b..8a6cc7b84 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -483,8 +483,7 @@ function _compile(self, sourcefile, objectfile, compflags, opt)
local t = os.mclock()
cppinfo = _preprocess(program, argv, {envs = self:runenvs(), tool = self})
if cppinfo then
- local cachekey
- cachekey = build_cache.cachekey(program, cppinfo.cppfile, cppinfo.cppflags, self:runenvs())
+ local cachekey = build_cache.cachekey(program, cppinfo.cppfile, cppinfo.cppflags, self:runenvs())
local objectfile_cached = build_cache.get(cachekey)
if objectfile_cached then
os.cp(objectfile_cached, cppinfo.objectfile)