diff options
| author | ruki <[email protected]> | 2021-05-08 16:01:27 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-05-08 16:07:12 +0800 |
| commit | cab3fb99fdc5a4a9fd97437cf4ed8a232a12ebc9 (patch) | |
| tree | f731b841ee1825620b73d410dd138f1580b8fe93 /xmake/modules/core/tools/nvcc.lua | |
| parent | 76d737fcc850ba14de9ca18cdb49c7bfbf3e6620 (diff) | |
improve nvcc
Diffstat (limited to 'xmake/modules/core/tools/nvcc.lua')
| -rw-r--r-- | xmake/modules/core/tools/nvcc.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua index 011599e8a..df4a6b7f4 100644 --- a/xmake/modules/core/tools/nvcc.lua +++ b/xmake/modules/core/tools/nvcc.lua @@ -317,12 +317,14 @@ function compile(self, sourcefile, objectfile, dependinfo, flags) compflags = table.join(compflags, "-MMD", "-MF", depfile) elseif _has_flags_mm(self) then -- since -MD is not supported, run nvcc twice - os.runv(compargv(self, sourcefile, depfile, table.join(flags, "-MM"))) + local program, argv = compargv(self, sourcefile, depfile, table.join(flags, "-MM")) + os.runv(program, argv, {envs = self:runenvs()}) end end -- do compile - local outdata, errdata = os.iorunv(compargv(self, sourcefile, objectfile, compflags)) + local program, argv = compargv(self, sourcefile, objectfile, compflags) + local outdata, errdata = os.iorunv(program, argv, {envs = self:runenvs()}) return (outdata or "") .. (errdata or "") end, catch |
