diff options
| author | ruki <[email protected]> | 2022-05-19 00:06:06 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-05-19 00:06:06 +0800 |
| commit | 17db46f7afecc8dce915b4440ed1461b19325974 (patch) | |
| tree | d68c44ba0dce6d695db2c0ef202d1af882dbcbd3 /xmake/modules/core/tools/cl.lua | |
| parent | 4d1aafedc90c94291d347b3f968c1d8736395382 (diff) | |
fix cache for pch
Diffstat (limited to 'xmake/modules/core/tools/cl.lua')
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index 6a67d5621..b768c1fce 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -512,19 +512,19 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, 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 outdata, errdata, _, _, cppfile, cppflags = _preprocess(program, argv, {envs = self:runenvs(), target = opt.target}) + local outdata, errdata, _, objectfile_real, cppfile, cppflags = _preprocess(program, argv, {envs = self:runenvs(), target = opt.target}) local cached = false local cachekey cachekey = build_cache.cachekey(program, cppfile, cppflags, self:runenvs()) local objectfile_cached = build_cache.get(cachekey) if objectfile_cached then - os.cp(objectfile_cached, objectfile) + os.cp(objectfile_cached, objectfile_real) cached = true end if not cached then vstool.iorunv(program, winos.cmdargv(argv), {envs = self:runenvs()}) if cachekey then - build_cache.put(cachekey, objectfile) + build_cache.put(cachekey, objectfile_real) end end return outdata, errdata |
