summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/gcc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/core/tools/gcc.lua')
-rw-r--r--xmake/modules/core/tools/gcc.lua9
1 files changed, 5 insertions, 4 deletions
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