mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
* `zig build --export [obj|lib|exe]` changed to `zig build_obj`, `zig build_lib` and `zig build_exe` respectively. * `--name` parameter is optional when it can be inferred from the root source filename. closes #207 * `zig build` now looks for `build.zig` which interacts with `std.build.Builder` to describe the targets, and then the zig build system prints TODO: build these targets. See #204 * add `@bitcast` which is mainly used for pointer reinterpret casting and make explicit casting not do pointer reinterpretation. Closes #290 * fix debug info for byval parameters * sort command line help options * `std.debug.panic` supports format string printing * add `std.mem.IncrementingAllocator` * fix const ptr to a variable with data changing at runtime. closes #289
17 lines
673 B
Zig
17 lines
673 B
Zig
// This file contains functions that zig depends on to coordinate between
|
|
// multiple .o files. The symbols are defined Weak so that multiple
|
|
// instances of zig_rt.zig do not conflict with each other.
|
|
|
|
export coldcc fn __zig_panic(message_ptr: &const u8, message_len: usize) -> noreturn {
|
|
@setGlobalLinkage(__zig_panic, GlobalLinkage.Weak);
|
|
@setDebugSafety(this, false);
|
|
|
|
if (@compileVar("panic_implementation_provided")) {
|
|
@import("@root").panic(message_ptr[0...message_len]);
|
|
} else if (@compileVar("os") == Os.freestanding) {
|
|
while (true) {}
|
|
} else {
|
|
@import("std").debug.panic("{}\n", message_ptr[0...message_len]);
|
|
}
|
|
}
|