diff options
| author | ruki <[email protected]> | 2024-02-06 11:04:20 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-02-06 11:04:20 +0800 |
| commit | c2d5a4a059d88134ef426cb58499994ef02508b2 (patch) | |
| tree | 7bb3a5531812a41ac48895a076e1d14e65ea7ea1 /xmake/modules/core/tools/gcc.lua | |
| parent | 8c92537300242e1705e522fe0e6a8087fe1f685c (diff) | |
| parent | b74097ad5fa27dd871ef4cdc6e342342eaca6192 (diff) | |
Merge pull request #4704 from xmake-io/cosmocc
Add cosmocc toolchain support
Diffstat (limited to 'xmake/modules/core/tools/gcc.lua')
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index e519b376a..e4e658749 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -519,13 +519,14 @@ end -- maybe we need to use os.vrunv() to show link output when enable verbose information -- @see https://github.com/xmake-io/xmake/discussions/2916 -- -function link(self, objectfiles, targetkind, targetfile, flags) +function link(self, objectfiles, targetkind, targetfile, flags, opt) + opt = opt or {} os.mkdir(path.directory(targetfile)) local program, argv = linkargv(self, objectfiles, targetkind, targetfile, flags) if option.get("verbose") then - os.execv(program, argv, {envs = self:runenvs()}) + os.execv(program, argv, {envs = self:runenvs(), shell = opt.shell}) else - os.vrunv(program, argv, {envs = self:runenvs()}) + os.vrunv(program, argv, {envs = self:runenvs(), shell = opt.shell}) end end @@ -705,17 +706,17 @@ function _compile(self, sourcefile, objectfile, compflags, opt) opt = opt or {} local program, argv = compargv(self, sourcefile, objectfile, compflags) local function _compile_fallback() - return os.iorunv(program, argv, {envs = self:runenvs()}) + return os.iorunv(program, argv, {envs = self:runenvs(), shell = opt.shell}) end local cppinfo if distcc_build_client.is_distccjob() and distcc_build_client.singleton():has_freejobs() then cppinfo = distcc_build_client.singleton():compile(program, argv, {envs = self:runenvs(), preprocess = _preprocess, compile = _compile_preprocessed_file, compile_fallback = _compile_fallback, - tool = self, remote = true}) + tool = self, remote = true, shell = opt.shell}) elseif build_cache.is_enabled(opt.target) and build_cache.is_supported(self:kind()) then cppinfo = build_cache.build(program, argv, {envs = self:runenvs(), preprocess = _preprocess, compile = _compile_preprocessed_file, compile_fallback = _compile_fallback, - tool = self}) + tool = self, shell = opt.shell}) end if cppinfo then return cppinfo.outdata, cppinfo.errdata |
