commit 741445ce298df5136553802f2681ca8dc5ad596f (tree)
parent 4d306ebd32f43363300188989a0bed99eb89c791
Author: Andrew Kelley <andrew@ziglang.org>
Date: Wed, 11 Jan 2023 17:05:14 -0800
build.zig: use zig-provided libc++ by default on Windows
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/build.zig b/build.zig
@@ -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) {