summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-11-25 22:58:20 +0800
committerruki <[email protected]>2024-11-25 22:58:20 +0800
commit5e88440be7c7746e00b0f6d8f193b9251160cbe8 (patch)
tree199a6561c00d578b2ddc25a53e3d7967302180b7
parent905455a7bf3d74db7d79d1e88dd27d7d000af67e (diff)
disable VS_UNICODE_OUTPUT for msvc-wine
-rw-r--r--xmake/modules/private/tools/vstool.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/xmake/modules/private/tools/vstool.lua b/xmake/modules/private/tools/vstool.lua
index 68db4a949..56601ba6c 100644
--- a/xmake/modules/private/tools/vstool.lua
+++ b/xmake/modules/private/tools/vstool.lua
@@ -37,7 +37,9 @@ function runv(program, argv, opt)
-- enable unicode output for vs toolchains, e.g. cl.exe, link.exe and etc.
-- @see https://github.com/xmake-io/xmake/issues/528
- opt.envs = table.join(envs, {VS_UNICODE_OUTPUT = outfile:rawfd()})
+ if is_host("windows") then
+ opt.envs = table.join(envs, {VS_UNICODE_OUTPUT = outfile:rawfd()})
+ end
-- execute it
local ok, syserrors = os.execv(program, argv, table.join(opt, {try = true, stdout = outfile, stderr = errpath}))
@@ -91,7 +93,7 @@ function iorunv(program, argv, opt)
-- init options
opt = opt or {}
-
+
-- if has VS_BINARY_OUTPUT dont enable unicode output
local envs = opt.envs or {}
if envs.VS_BINARY_OUTPUT then
@@ -105,7 +107,9 @@ function iorunv(program, argv, opt)
-- enable unicode output for vs toolchains, e.g. cl.exe, link.exe and etc.
-- @see https://github.com/xmake-io/xmake/issues/528
- opt.envs = table.join(envs, {VS_UNICODE_OUTPUT = outfile:rawfd()})
+ if is_host("windows") then
+ opt.envs = table.join(envs, {VS_UNICODE_OUTPUT = outfile:rawfd()})
+ end
-- run command
local ok, syserrors = os.execv(program, argv, table.join(opt, {try = true, stdout = outfile, stderr = errpath}))