summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2025-03-07 08:51:11 +0800
committerGitHub <[email protected]>2025-03-07 08:51:11 +0800
commitcd0d9331b49b98ab19ceaffffad231e3ba6680e5 (patch)
treebc07ff08dda6d8350d25f56924551ba8f34c9dbf /xmake/modules
parentd679ae73f4cbd996e37cb2f63636d197b6354a7c (diff)
parenta697325de5e02b1e94e2e79bc52dae4184331136 (diff)
Merge branch 'dev' into clang
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/private/tools/vstool.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/modules/private/tools/vstool.lua b/xmake/modules/private/tools/vstool.lua
index 56601ba6c..d687bb750 100644
--- a/xmake/modules/private/tools/vstool.lua
+++ b/xmake/modules/private/tools/vstool.lua
@@ -51,7 +51,8 @@ function runv(program, argv, opt)
if ok ~= 0 then
-- read errors
- local outdata = os.isfile(outpath) and io.readfile(outpath, {encoding = "utf16le"}) or nil
+ local encoding = is_host("windows") and "utf16le" or nil
+ local outdata = os.isfile(outpath) and io.readfile(outpath, {encoding = encoding}) or nil
local errdata = os.isfile(errpath) and io.readfile(errpath) or nil
local errors = errdata or ""
if #errors:trim() == 0 then
@@ -116,7 +117,8 @@ function iorunv(program, argv, opt)
-- get output and error data
outfile:close()
- local outdata = os.isfile(outpath) and io.readfile(outpath, {encoding = "utf16le"}) or nil
+ local encoding = is_host("windows") and "utf16le" or nil
+ local outdata = os.isfile(outpath) and io.readfile(outpath, {encoding = encoding}) or nil
local errdata = os.isfile(errpath) and io.readfile(errpath) or nil
-- remove the temporary output and error file