authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-08-29 22:33:39+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-08-30 09:55:44+02:00
logd813faaf0b37d02a337d1dd69556bbd11f37a3f6
treefc6f3cf5e409f8aa1080d3d800092bce833e8776
parent4d2e831300f1f32da5d51ccc4ab7be48d8f6b9f5

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.

1 files changed, 0 insertions(+), 6 deletions(-)

lib/std/zig/system.zig-6
......@@ -960,12 +960,6 @@ fn detectAbiAndDynamicLinker(io: Io, cpu: Target.Cpu, os: Target.Os, query: Targ
960960 if (!native_target_has_ld or have_all_info or os_is_non_native or is_illumos or is_darwin) {
961961 return defaultAbiAndDynamicLinker(cpu, os, query);
962962 }
963 if (query.abi) |abi| {
964 if (abi.isMusl()) {
965 // musl implies static linking.
966 return defaultAbiAndDynamicLinker(cpu, os, query);
967 }
968 }
969963 // The current target's ABI cannot be relied on for this. For example, we may build the zig
970964 // compiler for target riscv64-linux-musl and provide a tarball for users to download.
971965 // A user could then run that zig compiler on riscv64-linux-gnu. This use case is well-defined