From 741445ce298df5136553802f2681ca8dc5ad596f Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 11 Jan 2023 17:05:14 -0800 Subject: [PATCH] build.zig: use zig-provided libc++ by default on Windows --- build.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.zig b/build.zig index 71741a0136..1473fcbf3c 100644 --- 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) {