authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-02-01 14:26:12+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-04-22 15:31:56+02:00
log022fcc586971fa59f0e5c9f5a38a87735533fc29
tree3c419ba330118fb70664a372073f2fd3c53ef053
parent0c796adb87491359dcf56efc75fde763e43b733e
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Target: fuchsia supports arm/thumb now


2 files changed, 10 insertions(+), 1 deletions(-)

lib/std/Target.zig+8-1
......@@ -845,6 +845,12 @@ pub const Abi = enum {
845845 => .eabi,
846846 else => .none,
847847 },
848 .fuchsia => switch (arch) {
849 .arm,
850 .thumb,
851 => .eabihf,
852 else => .none,
853 },
848854 .haiku => switch (arch) {
849855 .arm,
850856 .powerpc,
......@@ -928,7 +934,6 @@ pub const Abi = enum {
928934 .wasi, .emscripten => .musl,
929935
930936 .contiki,
931 .fuchsia,
932937 .hermit,
933938 .illumos,
934939 .managarm,
......@@ -2442,8 +2447,10 @@ pub const DynamicLinker = struct {
24422447 pub fn standard(cpu: Cpu, os: Os, abi: Abi) DynamicLinker {
24432448 return switch (os.tag) {
24442449 .fuchsia => switch (cpu.arch) {
2450 .arm,
24452451 .aarch64,
24462452 .riscv64,
2453 .thumb,
24472454 .x86_64,
24482455 => init("ld.so.1"), // Fuchsia is unusual in that `DT_INTERP` is just a basename.
24492456 else => none,
test/llvm_targets.zig+2
......@@ -52,6 +52,7 @@ const targets = [_]std.Target.Query{
5252 .{ .cpu_arch = .arm, .os_tag = .freebsd, .abi = .eabihf },
5353 .{ .cpu_arch = .arm, .os_tag = .freestanding, .abi = .eabi },
5454 .{ .cpu_arch = .arm, .os_tag = .freestanding, .abi = .eabihf },
55 .{ .cpu_arch = .arm, .os_tag = .fuchsia, .abi = .eabihf },
5556 .{ .cpu_arch = .arm, .os_tag = .haiku, .abi = .eabi },
5657 .{ .cpu_arch = .arm, .os_tag = .haiku, .abi = .eabihf },
5758 .{ .cpu_arch = .arm, .os_tag = .linux, .abi = .androideabi },
......@@ -255,6 +256,7 @@ const targets = [_]std.Target.Query{
255256
256257 .{ .cpu_arch = .thumb, .os_tag = .freestanding, .abi = .eabi },
257258 .{ .cpu_arch = .thumb, .os_tag = .freestanding, .abi = .eabihf },
259 .{ .cpu_arch = .thumb, .os_tag = .fuchsia, .abi = .eabihf },
258260 .{ .cpu_arch = .thumb, .os_tag = .linux, .abi = .eabi },
259261 .{ .cpu_arch = .thumb, .os_tag = .linux, .abi = .eabihf },
260262 .{ .cpu_arch = .thumb, .os_tag = .linux, .abi = .musleabi },