diff options
| author | ruki <[email protected]> | 2015-06-16 18:27:00 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-16 18:27:00 +0800 |
| commit | d549aaedf96e6d6eb77e9d588dc0a0269cd1ae71 (patch) | |
| tree | 51d971fe326561b62895743a38a1544af6df2dff /xmake/scripts/base/linker.lua | |
| parent | 608602d0de1056f856e0b6bfe33b3f5fbe641b63 (diff) | |
fix the command is too long for nmake
Diffstat (limited to 'xmake/scripts/base/linker.lua')
| -rw-r--r-- | xmake/scripts/base/linker.lua | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/xmake/scripts/base/linker.lua b/xmake/scripts/base/linker.lua index caddaadc4..0f9ae1887 100644 --- a/xmake/scripts/base/linker.lua +++ b/xmake/scripts/base/linker.lua @@ -271,7 +271,7 @@ function linker.get(kind) end -- make the link command -function linker.make(module, target, objfiles, targetfile) +function linker.make(module, target, objfiles, targetfile, logfile) -- check assert(module and target) @@ -304,7 +304,7 @@ function linker.make(module, target, objfiles, targetfile) linker._addflags_from_config(module, flags, flagname) -- make the link command - return module:command_link(table.concat(objfiles, " "), targetfile, table.concat(flags, " "):trim()) + return module:command_link(table.concat(objfiles, " "), targetfile, table.concat(flags, " "):trim(), logfile) end -- check link for the project option @@ -333,12 +333,8 @@ function linker.check_links(opt, links, objectfile, targetfile) -- add flags from the configure linker._addflags_from_config(module, flags, "ldflags") - -- make the compile command - local cmd = string.format("%s > %s 2>&1", module:command_link(objectfile, targetfile, table.concat(flags, " "):trim()), xmake._NULDEV) - if not cmd then return end - -- execute the link command - return module:main(cmd) + return module:main(module:command_link(objectfile, targetfile, table.concat(flags, " "):trim(), xmake._NULDEV)) end -- return module: linker |
