diff options
| author | ruki <[email protected]> | 2017-07-12 18:34:01 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-07-12 18:34:01 +0800 |
| commit | b72d2cd32d1919170eb621dd6c0074c975eb67e1 (patch) | |
| tree | d34c3d1fbae58091301403fd9dc450bdad78647e /xmake/core/tool/linker.lua | |
| parent | 693619f971581f9b7bc66fcdb1ef65d01aa002e5 (diff) | |
modify compflags and add compargv
Diffstat (limited to 'xmake/core/tool/linker.lua')
| -rw-r--r-- | xmake/core/tool/linker.lua | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/xmake/core/tool/linker.lua b/xmake/core/tool/linker.lua index c313c045b..9e83e3e3a 100644 --- a/xmake/core/tool/linker.lua +++ b/xmake/core/tool/linker.lua @@ -179,12 +179,17 @@ end -- link the target file function linker:link(objectfiles, targetfile, opt) - return sandbox.load(self:_tool().link, self:_tool(), table.concat(table.wrap(objectfiles), " "), self:_targetkind(), targetfile, (self:linkflags(opt))) + return sandbox.load(self:_tool().link, self:_tool(), table.wrap(objectfiles), self:_targetkind(), targetfile, self:linkflags(opt)) +end + +-- get the link arguments list +function linker:linkargv(objectfiles, targetfile, opt) + return self:_tool():linkargv(table.wrap(objectfiles), self:_targetkind(), targetfile, self:linkflags(opt)) end -- get the link command function linker:linkcmd(objectfiles, targetfile, opt) - return self:_tool():linkcmd(table.concat(table.wrap(objectfiles), " "), self:_targetkind(), targetfile, (self:linkflags(opt))) + return os.args(table.join(self:linkargv(objectfiles, targetfile, opt))) end -- get the link flags @@ -211,7 +216,7 @@ function linker:linkflags(opt) self._FLAGS = self._FLAGS or {} local flags_cached = self._FLAGS[key] if flags_cached then - return flags_cached[1], flags_cached[2] + return flags_cached end end @@ -256,11 +261,11 @@ function linker:linkflags(opt) -- save flags if key then - self._FLAGS[key] = {flags_str, flags} + self._FLAGS[key] = flags end -- get it - return flags_str, flags + return flags end -- return module |
