build.zig: use zig-provided libc++ by default on Windows

This commit is contained in:
Andrew Kelley 2023-01-11 17:05:14 -08:00
parent 4d306ebd32
commit 741445ce29

View File

@ -568,14 +568,14 @@ fn addCmakeCfgOptionsToExe(
// back to -lc++ and cross our fingers.
addCxxKnownPath(b, cfg, exe, b.fmt("libstdc++.{s}", .{lib_suffix}), "", need_cpp_includes) catch |err| switch (err) {
error.RequiredLibraryNotFound => {
exe.linkSystemLibrary("c++");
exe.linkLibCpp();
},
else => |e| return e,
};
exe.linkSystemLibrary("unwind");
},
.ios, .macos, .watchos, .tvos => {
exe.linkSystemLibrary("c++");
.ios, .macos, .watchos, .tvos, .windows => {
exe.linkLibCpp();
},
.freebsd => {
if (static) {