We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.11.0-dev.3941+91daf1c8d
lib.zig
pub export fn add(a: i32, b: i32) i32 { return a + b; }
~/src/zig/build/stage3/bin/zig build-lib lib.zig -fno-emit-bin
Gives the following trace:
thread 210714 panic: attempt to use null value /home/thesm/src/zig/src/link.zig:973:44: 0x5bbd4b7 in linkAsArchive (zig) const directory = base.options.emit.?.directory; // Just an alias to make it shorter to type. ^ /home/thesm/src/zig/src/link.zig:786:38: 0x5984951 in flush (zig) return base.linkAsArchive(comp, prog_node); ^ /home/thesm/src/zig/src/Compilation.zig:2169:24: 0x59843b5 in flush (zig) comp.bin_file.flush(comp, prog_node) catch |err| switch (err) { ^ /home/thesm/src/zig/src/Compilation.zig:2150:23: 0x59871f4 in update (zig) try comp.flush(main_progress_node); ^ /home/thesm/src/zig/src/main.zig:3862:24: 0x59b34e0 in updateModule (zig) try comp.update(main_progress_node); ^ /home/thesm/src/zig/src/main.zig:3297:17: 0x58445fb in buildOutputType (zig) updateModule(comp) catch |err| switch (err) { ^ /home/thesm/src/zig/src/main.zig:271:31: 0x57f3302 in mainArgs (zig) return buildOutputType(gpa, arena, args, .{ .build = .Lib }); ^ /home/thesm/src/zig/src/main.zig:213:20: 0x57f0805 in main (zig) return mainArgs(gpa, arena, args); ^ /home/thesm/src/zig/lib/std/start.zig:608:37: 0x57f0287 in main (zig) const result = root.main() catch |err| { ^ zsh: IOT instruction (core dumped) ~/src/zig/build/stage3/bin/zig build-lib lib.zig -fno-emit-bin
No crash.
The text was updated successfully, but these errors were encountered:
6393928
link: add more respect for -fno-emit-bin
54ec19b
closes ziglang#16347
Successfully merging a pull request may close this issue.
Zig Version
0.11.0-dev.3941+91daf1c8d
Steps to Reproduce and Observed Behavior
lib.zig
~/src/zig/build/stage3/bin/zig build-lib lib.zig -fno-emit-bin
Gives the following trace:
Expected Behavior
No crash.
The text was updated successfully, but these errors were encountered: