diff options
| -rw-r--r-- | xmake/modules/core/tools/ar.lua | 5 | ||||
| -rw-r--r-- | xmake/modules/core/tools/link.lua | 1 | ||||
| -rw-r--r-- | xmake/modules/core/tools/llvm_ar.lua | 5 |
3 files changed, 7 insertions, 4 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} diff --git a/xmake/modules/core/tools/link.lua b/xmake/modules/core/tools/link.lua index dfeb362c4..9149de17e 100644 --- a/xmake/modules/core/tools/link.lua +++ b/xmake/modules/core/tools/link.lua @@ -96,6 +96,7 @@ function linkargv(self, objectfiles, targetkind, targetfile, flags, opt) local argv = table.join(flags, "-out:" .. targetfile, objectfiles) -- too long arguments for windows? + opt = opt or {} local args = os.args(argv) if #args > 1024 and not opt.rawargs then local argsfile = os.tmpfile(args) .. ".args.txt" diff --git a/xmake/modules/core/tools/llvm_ar.lua b/xmake/modules/core/tools/llvm_ar.lua index 309b49e88..091ea84d1 100644 --- a/xmake/modules/core/tools/llvm_ar.lua +++ b/xmake/modules/core/tools/llvm_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} |
