From ae38575b42e7ff6f7254c0ae1f1f0519416d83f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Sat, 3 May 2025 06:31:12 +0200 Subject: [PATCH] compiler: Rename misleading libcNeedsLibUnwind() function. It's about libc++, not libc. --- src/Compilation/Config.zig | 2 +- src/target.zig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Compilation/Config.zig b/src/Compilation/Config.zig index a4c69454b3..5019f47ebf 100644 --- a/src/Compilation/Config.zig +++ b/src/Compilation/Config.zig @@ -313,7 +313,7 @@ pub fn resolve(options: Options) ResolveError!Config { }; const link_libunwind = b: { - if (link_libcpp and target_util.libcNeedsLibUnwind(target)) { + if (link_libcpp and target_util.libCxxNeedsLibUnwind(target)) { if (options.link_libunwind == false) return error.LibCppRequiresLibUnwind; break :b true; } diff --git a/src/target.zig b/src/target.zig index b7cda53cf1..1bafb1b8f7 100644 --- a/src/target.zig +++ b/src/target.zig @@ -23,7 +23,7 @@ pub fn osRequiresLibC(target: std.Target) bool { return target.os.requiresLibC(); } -pub fn libcNeedsLibUnwind(target: std.Target) bool { +pub fn libCxxNeedsLibUnwind(target: std.Target) bool { return switch (target.os.tag) { .macos, .ios,