0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/lib/std/Target
Alex Rønne Petersen b61678c1b6
std.Target.Query: rework native ABI detection a bit
Native detection of the libc version now only happens if the ABI component in
the triple is native (= omitted in text form), rather than the OS component. So
the ABI is either fully native or fully specified with no weird in-between. I
think this much more closely matches people's mental model for this stuff;
Matthew and I struggled to make sense of the current semantics for almost an
hour, and ultimately agreed that it really shouldn't work the way it did prior
to this patch.

This is technically a breaking change because `native-native-gnu` no longer
means "use glibc with the detected native glibc version", and this concept is no
longer expressible. I don't consider this a great loss; I couldn't find any
usage in the wild that would be broken by this, and I would argue it was more
likely to be an unhelpful surprise. On the other hand, this patch makes
`native-native-gnueabihf` on e.g. an `x86_64-linux-gnu` system use the default
glibc version rather than the native one - which was a behavior I found bizarre.

I think the ABI detection code is now also much easier to reason about.

closes https://codeberg.org/ziglang/zig/issues/36863
History 2026-09-17 15:27:52 +02:00
..
aarch64.zig zig fmt 2026-07-17 23:30:26 +02:00
alpha.zig zig fmt 2026-07-17 23:30:26 +02:00
amdgcn.zig zig fmt 2026-07-17 23:30:26 +02:00
arc.zig zig fmt 2026-07-17 23:30:26 +02:00
arm.zig zig fmt 2026-07-17 23:30:26 +02:00
avr.zig zig fmt 2026-07-17 23:30:26 +02:00
bpf.zig zig fmt 2026-07-17 23:30:26 +02:00
csky.zig zig fmt 2026-07-17 23:30:26 +02:00
generic.zig std.Target: Introduce Cpu convenience functions for feature tests. 2025-06-05 06:12:00 +02:00
hexagon.zig zig fmt 2026-07-17 23:30:26 +02:00
hppa.zig zig fmt 2026-07-17 23:30:26 +02:00
kvx.zig zig fmt 2026-07-17 23:30:26 +02:00
lanai.zig all: update to use new std.lang.Type definitions 2026-05-27 10:03:51 +01:00
loongarch.zig zig fmt 2026-07-17 23:30:26 +02:00
m68k.zig zig fmt 2026-07-17 23:30:26 +02:00
mips.zig zig fmt 2026-07-17 23:30:26 +02:00
msp430.zig zig fmt 2026-07-17 23:30:26 +02:00
nvptx.zig zig fmt 2026-07-17 23:30:26 +02:00
powerpc.zig zig fmt 2026-07-17 23:30:26 +02:00
propeller.zig zig fmt 2026-07-17 23:30:26 +02:00
Query.zig std.Target.Query: rework native ABI detection a bit 2026-09-17 15:27:52 +02:00
riscv.zig zig fmt 2026-07-17 23:30:26 +02:00
s390x.zig zig fmt 2026-07-17 23:30:26 +02:00
sparc.zig zig fmt 2026-07-17 23:30:26 +02:00
spirv.zig zig fmt 2026-07-17 23:30:26 +02:00
ve.zig zig fmt 2026-07-17 23:30:26 +02:00
wasm.zig zig fmt 2026-07-17 23:30:26 +02:00
x86.zig zig fmt 2026-07-17 23:30:26 +02:00
xcore.zig all: update to use new std.lang.Type definitions 2026-05-27 10:03:51 +01:00
xtensa.zig zig fmt 2026-07-17 23:30:26 +02:00