From 07a71fc3221dfba05caea5a50ebe3dac5c76d643 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 6 Feb 2017 03:10:32 -0500 Subject: improved behavior on debug safety crash * instead of emitting a breakpoint for a debug safety crash, zig calls a panic function which prints an error message and a stack trace and then calls abort. * on freestanding OS, this panic function has a default implementation of a simple infinite loop. * users can override the panic implementation by providing `pub fn panic(message: []const u8) -> unreachable { }` * workaround for LLVM segfaulting when you try to use cold calling convention on ARM. closes #245 --- std/bootstrap.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'std/bootstrap.zig') diff --git a/std/bootstrap.zig b/std/bootstrap.zig index 52acab6544..17e32a96f4 100644 --- a/std/bootstrap.zig +++ b/std/bootstrap.zig @@ -1,8 +1,9 @@ // This file is in a package which has the root source file exposed as "@root". const root = @import("@root"); -const linux = @import("linux.zig"); -const cstr = @import("cstr.zig"); +const std = @import("std"); +const linux = std.linux; +const cstr = std.cstr; const want_start_symbol = switch(@compileVar("os")) { Os.linux => true, -- cgit v1.2.3