summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/dmd.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-07-13 09:51:24 +0800
committerruki <[email protected]>2017-07-13 09:51:41 +0800
commitb9e5a411e38224db1f71a39cad57cc54dc13fee6 (patch)
tree916f94e87922de4b7ec2168245e3c1fd8763a8e6 /xmake/modules/core/tools/dmd.lua
parentb72d2cd32d1919170eb621dd6c0074c975eb67e1 (diff)
modify all cmd to argv for core.tools
Diffstat (limited to 'xmake/modules/core/tools/dmd.lua')
-rw-r--r--xmake/modules/core/tools/dmd.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/xmake/modules/core/tools/dmd.lua b/xmake/modules/core/tools/dmd.lua
index 30c0ce394..03855e4f3 100644
--- a/xmake/modules/core/tools/dmd.lua
+++ b/xmake/modules/core/tools/dmd.lua
@@ -150,9 +150,9 @@ function nf_rpathdir(self, dir)
end
end
--- make the link command
-function linkcmd(self, objectfiles, targetkind, targetfile, flags)
- return format("%s %s -of%s %s", self:program(), flags, targetfile, objectfiles)
+-- make the link arguments list
+function linkargv(self, objectfiles, targetkind, targetfile, flags)
+ return self:program(), table.join(flags, "-of" .. targetfile, objectfiles)
end
-- link the target file
@@ -162,12 +162,12 @@ function link(self, objectfiles, targetkind, targetfile, flags)
os.mkdir(path.directory(targetfile))
-- link it
- os.run(linkcmd(self, objectfiles, targetkind, targetfile, flags))
+ os.runv(linkargv(self, objectfiles, targetkind, targetfile, flags))
end
--- make the complie command
-function compcmd(self, sourcefiles, objectfile, flags)
- return format("%s -c %s -of%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("-c", flags, "-of" .. objectfile, sourcefiles)
end
-- complie the source file
@@ -177,6 +177,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