diff options
| author | ruki <[email protected]> | 2020-06-20 19:14:20 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-06-20 19:14:20 +0800 |
| commit | 8a4d7349f8562a3cf5869dfa4a6460c049f44f3b (patch) | |
| tree | b508e7659b0c6be16fbafeb9481df9751a60992f /xmake/modules/core/tools/ml.lua | |
| parent | 966b8dd7a01b09a93ba21ee4d2df0d471ab2282c (diff) | |
fix check options
Diffstat (limited to 'xmake/modules/core/tools/ml.lua')
| -rw-r--r-- | xmake/modules/core/tools/ml.lua | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/xmake/modules/core/tools/ml.lua b/xmake/modules/core/tools/ml.lua index 4899b46c6..42c10b633 100644 --- a/xmake/modules/core/tools/ml.lua +++ b/xmake/modules/core/tools/ml.lua @@ -91,12 +91,12 @@ function nf_includedir(self, dir) end -- make the compile arguments list -function _compargv1(self, sourcefile, objectfile, flags) +function compargv(self, sourcefile, objectfile, flags) return self:program(), table.join("-c", flags, "-Fo" .. os.args(objectfile), sourcefile) end -- compile the source file -function _compile1(self, sourcefile, objectfile, dependinfo, flags) +function compile(self, sourcefile, objectfile, dependinfo, flags) -- ensure the object directory os.mkdir(path.directory(objectfile)) @@ -105,7 +105,8 @@ function _compile1(self, sourcefile, objectfile, dependinfo, flags) { function () -- @note we need not uses vstool.runv to enable unicode output for ml.exe - os.runv(_compargv1(self, sourcefile, objectfile, flags)) + local program, argv = compargv(self, sourcefile, objectfile, flags) + os.runv(program, argv, {envs = opt.envs}) end, catch { @@ -125,23 +126,3 @@ function _compile1(self, sourcefile, objectfile, dependinfo, flags) } end --- make the compile arguments list -function compargv(self, sourcefiles, objectfile, flags) - - -- only support single source file now - assert(type(sourcefiles) ~= "table", "'object:sources' not support!") - - -- for only single source file - return _compargv1(self, sourcefiles, objectfile, flags) -end - --- compile the source file -function compile(self, sourcefiles, objectfile, dependinfo, flags) - - -- only support single source file now - assert(type(sourcefiles) ~= "table", "'object:sources' not support!") - - -- for only single source file - _compile1(self, sourcefiles, objectfile, dependinfo, flags) -end - |
