diff options
| author | ruki <[email protected]> | 2022-05-20 21:05:11 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-05-20 21:05:11 +0800 |
| commit | 6fad9d40962d1c137d65394e99ea84acba5fe5cc (patch) | |
| tree | 17432ea4bc94db74b3eedbc9fd19d5492ea6d148 /xmake/modules/core/tools/cl.lua | |
| parent | c3fd2dd9110aa41cd321d5e73823f57f2d25ff8c (diff) | |
ignore remote pdb
Diffstat (limited to 'xmake/modules/core/tools/cl.lua')
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index a3a3dc5aa..ab17b2aa3 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -404,6 +404,7 @@ function _preprocess(program, argv, opt) local cppflags = {} local skipped = 0 local objectfile + local pdbfile for _, flag in ipairs(argv) do if flag:startswith("-Fo") or flag:startswith("/Fo") then objectfile = flag:sub(4) @@ -431,6 +432,9 @@ function _preprocess(program, argv, opt) skipped = 1 elseif flag == "-I" or flag == "-sourceDependencies" or flag == "/sourceDependencies" then skipped = 2 + elseif opt.remote and flag:startswith("-Fd") or flag:startswith("/Fd") then + skipped = 1 + pdbfile = flag:sub(4) --TODO handle remote pdb end if skipped > 0 then skipped = skipped - 1 @@ -457,7 +461,9 @@ function _preprocess(program, argv, opt) table.insert(cppflags, sourcefile) return try{ function() local outdata, errdata = vstool.iorunv(program, winos.cmdargv(cppflags), opt) - return {outdata = outdata, errdata = errdata, sourcefile = sourcefile, objectfile = objectfile, cppfile = cppfile, cppflags = flags} + return {outdata = outdata, errdata = errdata, + sourcefile = sourcefile, objectfile = objectfile, cppfile = cppfile, cppflags = flags, + pdbfile = pdbfile} end} end @@ -468,7 +474,7 @@ function _compile(self, sourcefile, objectfile, compflags, opt) if distcc_build_client.is_distccjob() and distcc_build_client.singleton():has_freejobs() then local program, argv = compargv(self, sourcefile, objectfile, compflags, table.join(opt, {rawargs = true})) cppinfo = distcc_build_client.singleton():compile(program, argv, {envs = self:runenvs(), - preprocess = _preprocess, tool = self, target = opt.target}) + preprocess = _preprocess, tool = self, target = opt.target, remote = true}) if cppinfo and build_in_local then vstool.iorunv(program, winos.cmdargv(table.join(cppinfo.cppflags, "-Fo" .. cppinfo.objectfile, cppinfo.cppfile)), {envs = self:runenvs()}) if build_cache.is_enabled() and build_cache.is_supported(self:kind()) then |
