diff options
| author | ruki <[email protected]> | 2015-06-03 18:34:06 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-03 18:34:06 +0800 |
| commit | a73db10e9b42c8b18bf5b95d78855481beb67f20 (patch) | |
| tree | b2e13353bc39cfd3f3b0cfb115b07bc15e505a00 /xmake/scripts/linker/linker.lua | |
| parent | 795001d9b03960d9a8fc290e6f6f9710f49c86bc (diff) | |
trim spaces for the makefile command
Diffstat (limited to 'xmake/scripts/linker/linker.lua')
| -rw-r--r-- | xmake/scripts/linker/linker.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/xmake/scripts/linker/linker.lua b/xmake/scripts/linker/linker.lua index d5338271a..c8f651971 100644 --- a/xmake/scripts/linker/linker.lua +++ b/xmake/scripts/linker/linker.lua @@ -92,7 +92,7 @@ function linker._make(self, target, objfiles, targetfile) if self._make_linkdir then local linkdirs = utils.wrap(target.linkdirs) for _, linkdir in ipairs(linkdirs) do - flags_target = string.format("%s %s", flags_target, self._make_linkdir(configs, linkdir)) + flags_target = flags_target:append(self._make_linkdir(configs, linkdir), " ") end end @@ -100,7 +100,7 @@ function linker._make(self, target, objfiles, targetfile) if self._make_link then local links = utils.wrap(target.links) for _, link in ipairs(links) do - flags_target = string.format("%s %s", flags_target, self._make_link(configs, link)) + flags_target = flags_target:append(self._make_link(configs, link), " ") end end @@ -109,7 +109,11 @@ function linker._make(self, target, objfiles, targetfile) assert(flags_config) -- make the flags string - local flags = string.format("%s %s %s", flags_common, flags_target, flags_config) + local flags = "" + flags = flags:append(flags_common, " ") + flags = flags:append(flags_target, " ") + flags = flags:append(flags_config, " ") + flags = flags:trim() -- make it return self._make(configs, table.concat(objfiles, " "), targetfile, flags) |
