From dcaeda333910bc331fc706394cef7dd8fa81b1fe Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 17 Jun 2020 23:32:11 +0800 Subject: improve cl to support 8192 limit --- xmake/core/base/winos.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xmake/core/base') diff --git a/xmake/core/base/winos.lua b/xmake/core/base/winos.lua index 5841f5a6c..40283e4f5 100644 --- a/xmake/core/base/winos.lua +++ b/xmake/core/base/winos.lua @@ -154,14 +154,15 @@ end function winos.cmdargv(argv, key) -- too long arguments? + local limit = 4096 local argn = 0 for _, arg in ipairs(argv) do argn = argn + #arg - if argn > 1024 then + if argn > limit then break end end - if argn > 1024 then + if argn > limit then local argsfile = os.tmpfile(key or table.concat(argv, '')) .. ".args.txt" local f = io.open(argsfile, 'w') if f then -- cgit v1.3.1