build: stop linking libc++ for utfcpp (#12239)

utfcpp is a header-only dependency, so its package wrapper does not need
to link the C++ standard library. Keep the empty static archive for
build integration, but stop adding an unnecessary libc++ dependency.
pull/12276/head
Mitchell Hashimoto 2026-04-11 14:55:11 -07:00 committed by GitHub
commit 557de7c925
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 8 deletions

View File

@ -13,14 +13,6 @@ pub fn build(b: *std.Build) !void {
.linkage = .static,
});
lib.linkLibC();
// On MSVC, we must not use linkLibCpp because Zig unconditionally
// passes -nostdinc++ and then adds its bundled libc++/libc++abi
// include paths, which conflict with MSVC's own C++ runtime headers.
// The MSVC SDK include directories (added via linkLibC) contain
// both C and C++ headers, so linkLibCpp is not needed.
if (target.result.abi != .msvc) {
lib.linkLibCpp();
}
if (target.result.os.tag.isDarwin()) {
const apple_sdk = @import("apple_sdk");