From b78f608ae74c5c0398e9160891fc6bbef08e358f Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 5 Feb 2024 23:56:46 +0800 Subject: pass shell to cosmocc --- xmake/modules/core/tools/gcc.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'xmake/modules/core/tools/gcc.lua') diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index e519b376a..d5ae314b7 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,7 +706,7 @@ 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 -- cgit v1.3.1 From 1dd66f29e0923d994fc37fcee2db328367c46e7b Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 6 Feb 2024 22:32:37 +0800 Subject: pass shell --- xmake/modules/core/tools/gcc.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xmake/modules/core/tools/gcc.lua') diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index d5ae314b7..e4e658749 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -712,11 +712,11 @@ function _compile(self, sourcefile, objectfile, compflags, opt) 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 -- cgit v1.3.1