summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/ar.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-08-15 23:59:31 +0800
committerruki <[email protected]>2019-08-15 17:57:26 +0800
commit4cbb9e3045a7a491f2347ecf9f595e9e326f059b (patch)
tree286cb4d520d684025cad54a8b6c563bc0fa0fa71 /xmake/modules/core/tools/ar.lua
parentff793aba3703a7d082b70403b0b8d52e00f5345b (diff)
add opt.rawargs
Diffstat (limited to 'xmake/modules/core/tools/ar.lua')
-rw-r--r--xmake/modules/core/tools/ar.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/ar.lua b/xmake/modules/core/tools/ar.lua
index c411e7e1f..05645f3e3 100644
--- a/xmake/modules/core/tools/ar.lua
+++ b/xmake/modules/core/tools/ar.lua
@@ -41,7 +41,7 @@ function strip(self, level)
end
-- make the link arguments list
-function linkargv(self, objectfiles, targetkind, targetfile, flags)
+function linkargv(self, objectfiles, targetkind, targetfile, flags, opt)
-- check
assert(targetkind == "static")
@@ -51,8 +51,9 @@ function linkargv(self, objectfiles, targetkind, targetfile, flags)
-- too long arguments for windows?
if is_host("windows") then
+ opt = opt or {}
local args = os.args(argv)
- if #args > 1024 then
+ if #args > 1024 and not opt.rawargs then
local argsfile = os.tmpfile(args) .. ".args.txt"
io.writefile(argsfile, args)
argv = {"@" .. argsfile}