From d549aaedf96e6d6eb77e9d588dc0a0269cd1ae71 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 16 Jun 2015 18:27:00 +0800 Subject: fix the command is too long for nmake --- xmake/scripts/base/linker.lua | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'xmake/scripts/base/linker.lua') 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 -- cgit v1.3.1