diff options
| author | ruki <[email protected]> | 2020-06-22 23:17:06 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-06-22 13:42:41 +0800 |
| commit | ce6d63d5a4ea3df28fc21db6b4501d4b65480584 (patch) | |
| tree | fd1ab981ab8c102c173a4679fcbac218f6c79311 /xmake/modules/core | |
| parent | 4e18de04e01386bf7304bbf9d08ec826a1fa6285 (diff) | |
fix mingw/gcc envs
Diffstat (limited to 'xmake/modules/core')
| -rw-r--r-- | xmake/modules/core/tools/ar.lua | 3 | ||||
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 3 | ||||
| -rw-r--r-- | xmake/modules/core/tools/ml.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/core/tools/rc.lua | 4 |
4 files changed, 8 insertions, 6 deletions
diff --git a/xmake/modules/core/tools/ar.lua b/xmake/modules/core/tools/ar.lua index 576d40695..3e520f887 100644 --- a/xmake/modules/core/tools/ar.lua +++ b/xmake/modules/core/tools/ar.lua @@ -71,7 +71,8 @@ function link(self, objectfiles, targetkind, targetfile, flags) os.tryrm(targetfile) -- link it - os.runv(linkargv(self, objectfiles, targetkind, targetfile, flags)) + local program, argv = linkargv(self, objectfiles, targetkind, targetfile, flags) + os.runv(program, argv, {envs = self:runenvs()}) end -- extract the static library to object directory diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 04839ceaf..4e16875c9 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -424,7 +424,8 @@ function compile(self, sourcefile, objectfile, dependinfo, flags) end -- do compile - return os.iorunv(compargv(self, sourcefile, objectfile, compflags)) + local program, argv = compargv(self, sourcefile, objectfile, compflags) + return os.iorunv(program, argv, {envs = self:runenvs()}) end, catch { diff --git a/xmake/modules/core/tools/ml.lua b/xmake/modules/core/tools/ml.lua index a6523243d..3d6fb7c18 100644 --- a/xmake/modules/core/tools/ml.lua +++ b/xmake/modules/core/tools/ml.lua @@ -96,7 +96,7 @@ function compargv(self, sourcefile, objectfile, flags) end -- compile the source file -function compile(self, sourcefile, objectfile, dependinfo, flags, opt) +function compile(self, sourcefile, objectfile, dependinfo, flags) -- ensure the object directory os.mkdir(path.directory(objectfile)) @@ -106,7 +106,7 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt) function () -- @note we need not uses vstool.runv to enable unicode output for ml.exe local program, argv = compargv(self, sourcefile, objectfile, flags) - os.runv(program, argv, {envs = opt.envs}) + os.runv(program, argv, {envs = self:runenvs()}) end, catch { diff --git a/xmake/modules/core/tools/rc.lua b/xmake/modules/core/tools/rc.lua index 4d5d79a86..a0379ca57 100644 --- a/xmake/modules/core/tools/rc.lua +++ b/xmake/modules/core/tools/rc.lua @@ -49,7 +49,7 @@ function compargv(self, sourcefile, objectfile, flags) end -- compile the source file -function compile(self, sourcefile, objectfile, dependinfo, flags, opt) +function compile(self, sourcefile, objectfile, dependinfo, flags) -- ensure the object directory os.mkdir(path.directory(objectfile)) @@ -60,7 +60,7 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt) function () -- @note we need not uses vstool.iorunv to enable unicode output for rc.exe local program, argv = compargv(self, sourcefile, objectfile, flags) - local outdata, errdata = os.iorunv(program, argv, {envs = opt.envs}) + local outdata, errdata = os.iorunv(program, argv, {envs = self:runenvs()}) return (outdata or "") .. (errdata or "") end, catch |
