From d10447f1649a8829d45fa0324281fd4aba3b5e9e Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 1 Dec 2024 22:23:20 +0800 Subject: fix winos.cmdargv for msvc-wine --- xmake/core/base/winos.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmake/core/base/winos.lua b/xmake/core/base/winos.lua index 68815bec8..e8a09a2ae 100644 --- a/xmake/core/base/winos.lua +++ b/xmake/core/base/winos.lua @@ -168,7 +168,7 @@ function winos.cmdargv(argv, opt) if argn > limit then opt = opt or {} local argsfile = os.tmpfile(opt.tmpkey or os.args(argv)) .. ".args.txt" - local f = io.open(argsfile, 'w', {encoding = "ansi"}) + local f = io.open(argsfile, 'w', {encoding = is_host("windows") and "ansi"}) if f then -- we need to split args file to solve `fatal error LNK1170: line in command file contains 131071 or more characters` -- @see https://github.com/xmake-io/xmake/issues/812 -- cgit v1.3.1