diff options
| author | ruki <[email protected]> | 2020-05-27 22:32:14 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-05-27 09:13:27 +0800 |
| commit | 19543006bae204763ea5922f883f279c6038f499 (patch) | |
| tree | 14fa0ef0f238a912180394b603aadec931fc8b92 /xmake/modules/core/tools/ar.lua | |
| parent | 7690eaf09fd10101d67c10f8fdbf3fc0f02992fe (diff) | |
improve cmdargv for win
Diffstat (limited to 'xmake/modules/core/tools/ar.lua')
| -rw-r--r-- | xmake/modules/core/tools/ar.lua | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/xmake/modules/core/tools/ar.lua b/xmake/modules/core/tools/ar.lua index b3a034aac..774afdd9c 100644 --- a/xmake/modules/core/tools/ar.lua +++ b/xmake/modules/core/tools/ar.lua @@ -47,17 +47,10 @@ function linkargv(self, objectfiles, targetkind, targetfile, flags, opt) assert(targetkind == "static") -- init arguments + opt = opt or {} local argv = table.join(flags, targetfile, objectfiles) - - -- too long arguments for windows? - if is_host("windows") then - opt = opt or {} - local args = os.args(argv, {escape = true}) - if #args > 1024 and not opt.rawargs then - local argsfile = os.tmpfile(args) .. ".args.txt" - io.writefile(argsfile, args) - argv = {"@" .. argsfile} - end + if is_host("windows") and not opt.rawargs then + argv = winos.cmdargv(argv) end -- make it |
