summaryrefslogtreecommitdiff
path: root/xmake/scripts/tools/ar.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/scripts/tools/ar.lua')
-rw-r--r--xmake/scripts/tools/ar.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/scripts/tools/ar.lua b/xmake/scripts/tools/ar.lua
index b2e2618eb..b80dc4ddf 100644
--- a/xmake/scripts/tools/ar.lua
+++ b/xmake/scripts/tools/ar.lua
@@ -40,10 +40,14 @@ function ar.init(self, name)
end
-- make the link command
-function ar.command_link(self, objfiles, targetfile, flags)
+function ar.command_link(self, objfiles, targetfile, flags, logfile)
+
+ -- redirect
+ local redirect = ""
+ if logfile then redirect = string.format(" > %s 2>&1", logfile) end
-- make it
- return string.format("%s %s %s %s", self._NAME, flags, targetfile, objfiles)
+ return string.format("%s %s %s %s%s", self._NAME, flags, targetfile, objfiles, redirect)
end
-- the main function