Closed
Description
Zig Version
0.14.0-dev.1632+d83a3f174
Steps to Reproduce and Observed Behavior
Minimal case to repro:
-
build.zig.zon
.{ .name = "tmp.CsP3FWngBQ", .version = "0.0.0", .paths = .{ "build.zig", "build.zig.zon", "src", }, }
-
build.zig
const std = @import("std"); pub fn build(b: *std.Build) void { const target = b.resolveTargetQuery(std.Target.Query{ .cpu_arch = .avr, .cpu_model = .{ .explicit = &std.Target.avr.cpu.attiny13a }, .os_tag = .freestanding, .abi = .none, }); const optimize = std.builtin.OptimizeMode.ReleaseSmall; const exe = b.addExecutable(.{ .name = "tmp.CsP3FWngBQ", .root_source_file = b.path("src/main.zig"), .target = target, .optimize = optimize, }); b.installArtifact(exe); }
-
src/main.zig
pub export fn _start() void {}
zig build
output:
install
└─ install tmp.CsP3FWngBQ
└─ zig build-exe tmp.CsP3FWngBQ ReleaseSmall avr-freestanding-none failure
error: error: <unknown>:0: out of range branch target (expected an integer in the range -4096 to 4095)
Expected Behavior
Code compiles successfully. Confirmed to work on 0.13.0
.