commit 9856bea34e9d7eca6dfc2e883d46f24a53265dc6 (tree)
parent bb15e4057c9c8bb22084990de475ab10a44592c0
Author: kcbanner <kcbanner@gmail.com>
Date: Sun, 15 Jan 2023 13:10:19 -0500
build: avoid zig's libc++ on *-windows-msvc
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/build.zig b/build.zig
@@ -574,9 +574,12 @@ fn addCmakeCfgOptionsToExe(
};
exe.linkSystemLibrary("unwind");
},
- .ios, .macos, .watchos, .tvos, .windows => {
+ .ios, .macos, .watchos, .tvos => {
exe.linkLibCpp();
},
+ .windows => {
+ if (exe.target.getAbi() != .msvc) exe.linkLibCpp();
+ },
.freebsd => {
if (static) {
try addCxxKnownPath(b, cfg, exe, b.fmt("libc++.{s}", .{lib_suffix}), null, need_cpp_includes);