summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/core/tools/zig.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/zig.lua b/xmake/modules/core/tools/zig.lua
index 81d06c0da..23f0d6e32 100644
--- a/xmake/modules/core/tools/zig.lua
+++ b/xmake/modules/core/tools/zig.lua
@@ -106,6 +106,14 @@ function linkargv(self, objectfiles, targetkind, targetfile, flags)
local argv = {}
if targetkind == "binary" then
table.insert(argv, "build-exe")
+ if is_plat("windows") then
+ -- TODO this is only a temporary workaround to fix msvc/lld issue for zig 0.7.0.
+ -- @see https://github.com/ziglang/zig/issues/5825
+ table.insert(argv, "--subsystem")
+ table.insert(argv, "console")
+ table.insert(argv, "-lkernel32")
+ table.insert(argv, "-lntdll")
+ end
elseif targetkind == "static" or targetkind == "shared" then
table.insert(argv, "build-lib")
else