diff options
| author | ruki <[email protected]> | 2017-07-13 09:51:24 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-07-13 09:51:41 +0800 |
| commit | b9e5a411e38224db1f71a39cad57cc54dc13fee6 (patch) | |
| tree | 916f94e87922de4b7ec2168245e3c1fd8763a8e6 /xmake/modules/core/tools/rustc.lua | |
| parent | b72d2cd32d1919170eb621dd6c0074c975eb67e1 (diff) | |
modify all cmd to argv for core.tools
Diffstat (limited to 'xmake/modules/core/tools/rustc.lua')
| -rw-r--r-- | xmake/modules/core/tools/rustc.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/xmake/modules/core/tools/rustc.lua b/xmake/modules/core/tools/rustc.lua index 635d94e9c..f82dcf006 100644 --- a/xmake/modules/core/tools/rustc.lua +++ b/xmake/modules/core/tools/rustc.lua @@ -94,9 +94,9 @@ function nf_linkdir(self, dir) return {"-L", dir} end --- make the build command -function buildcmd(self, sourcefiles, targetkind, targetfile, flags) - return format("%s %s -o %s %s", self:program(), flags, targetfile, table.concat(sourcefiles, " ")) +-- make the build arguments list +function buildargv(self, sourcefiles, targetkind, targetfile, flags) + return self:program(), table.join(flags, "-o", targetfile, sourcefiles) end -- build the target file @@ -106,12 +106,12 @@ function build(self, sourcefiles, targetkind, targetfile, flags) os.mkdir(path.directory(targetfile)) -- build it - os.run(buildcmd(self, sourcefiles, targetkind, targetfile, flags)) + os.runv(buildargv(self, sourcefiles, targetkind, targetfile, flags)) end --- make the complie command -function compcmd(self, sourcefiles, objectfile, flags) - return format("%s --emit obj %s -o %s %s", self:program(), flags, objectfile, table.concat(table.wrap(sourcefiles), " ")) +-- make the complie arguments list +function compargv(self, sourcefiles, objectfile, flags) + return self:program(), table.join("--emit", "obj", flags, "-o", objectfile, sourcefiles) end -- complie the source file @@ -121,6 +121,6 @@ function compile(self, sourcefiles, objectfile, incdepfile, flags) os.mkdir(path.directory(objectfile)) -- compile it - os.run(compcmd(self, sourcefiles, objectfile, flags)) + os.runv(compargv(self, sourcefiles, objectfile, flags)) end |
