From d813faaf0b37d02a337d1dd69556bbd11f37a3f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Sat, 29 Aug 2026 22:33:39 +0200 Subject: [PATCH] std.zig.system: remove dubious musl special case in detectAbiAndDynamicLinker() This might have made some kind of sense in the past when we only supported static musl, but we've supported dynamic musl for a while now. Additionally, the detection code here should work perfectly fine on a dynamic musl system. --- lib/std/zig/system.zig | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/std/zig/system.zig b/lib/std/zig/system.zig index 1baa6e8cad8a996b1705219bd5a25d514ce8090f..0650a2ae21602aa945b26735c6772bfa5aeb0561 100644 --- a/lib/std/zig/system.zig +++ b/lib/std/zig/system.zig @@ -960,12 +960,6 @@ fn detectAbiAndDynamicLinker(io: Io, cpu: Target.Cpu, os: Target.Os, query: Targ if (!native_target_has_ld or have_all_info or os_is_non_native or is_illumos or is_darwin) { return defaultAbiAndDynamicLinker(cpu, os, query); } - if (query.abi) |abi| { - if (abi.isMusl()) { - // musl implies static linking. - return defaultAbiAndDynamicLinker(cpu, os, query); - } - } // The current target's ABI cannot be relied on for this. For example, we may build the zig // compiler for target riscv64-linux-musl and provide a tarball for users to download. // A user could then run that zig compiler on riscv64-linux-gnu. This use case is well-defined -- 2.54.0