Zig Version
0.12.0-dev.168+a31748b29
Steps to Reproduce and Observed Behavior
exe.zig
externfnpanic() void;
pubfnmain() void {
panic();
}lib.zig
exportfnpanic() void {
@panic("panic");
}build.zig
conststd=@import("std");
pubfnbuild(b: *std.Build) !void {
consttarget=b.standardTargetOptions(.{});
constoptimize=b.standardOptimizeOption(.{});
constlib=b.addStaticLibrary(.{
.name="lib",
.root_source_file= .{ .path="lib.zig" },
.target=target,
.optimize=optimize,
});
constexe=b.addExecutable(.{
.name="exe",
.root_source_file= .{ .path="exe.zig" },
.target=target,
.optimize=optimize,
});
exe.linkLibrary(lib);
b.installArtifact(exe);
construn_cmd=b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
construn_step=b.step("run", "Run");
run_step.dependOn(&run_cmd.step);
}$ zig build run
steps [2/6] zig build-exe exe Debug native... LLVM Emit Object... thread 143239 panic: panic
Panicked during a panic. Aborting.
Expected Behavior
$ zig build run
steps [2/6] zig build-exe exe Debug native... LLVM Emit Object... thread 142400 panic: panic
lib.zig:2:5: 0x21ea65 in main (exe)
@panic("panic");
^
Zig Version
0.12.0-dev.168+a31748b29
Steps to Reproduce and Observed Behavior
exe.ziglib.zigbuild.zigExpected Behavior