diff options
| author | ruki <[email protected]> | 2020-11-11 22:33:53 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-11-11 22:33:53 +0800 |
| commit | b492db92027dfdbb073f430d04e929ab826116fb (patch) | |
| tree | 4f493bbc64f4d04a42c8343684a362b3f3eda5dd /xmake/modules/core/tools/zig.lua | |
| parent | 4de40c8e54d44e5f0d99efc6791b2ee5466156e2 (diff) | |
add temp workaround to fix zig lld on windows
Diffstat (limited to 'xmake/modules/core/tools/zig.lua')
| -rw-r--r-- | xmake/modules/core/tools/zig.lua | 8 |
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 |
