diff options
| author | Veikka Tuominen <git@vexu.eu> | 2023-01-03 19:37:11 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-01-05 02:31:29 -0700 |
| commit | f83834993e2628e347da71a11ffb07c804fc46c5 (patch) | |
| tree | 21fd10b3ba19c4236326549872a202a4ffe29b3f /lib/std/debug.zig | |
| parent | fe2bd9dda8467b775da4fe3bd535aece9e07ee1b (diff) | |
| download | zig-f83834993e2628e347da71a11ffb07c804fc46c5.tar.gz zig-f83834993e2628e347da71a11ffb07c804fc46c5.zip | |
std: collect all options under one namespace
Diffstat (limited to 'lib/std/debug.zig')
| -rw-r--r-- | lib/std/debug.zig | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig index 933af55cc9..44310de261 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -1861,10 +1861,9 @@ pub const have_segfault_handling_support = switch (native_os) { .freebsd, .openbsd => @hasDecl(os.system, "ucontext_t"), else => false, }; -pub const enable_segfault_handler: bool = if (@hasDecl(root, "enable_segfault_handler")) - root.enable_segfault_handler -else - runtime_safety and have_segfault_handling_support; + +const enable_segfault_handler = std.options.enable_segfault_handler; +pub const default_enable_segfault_handler = runtime_safety and have_segfault_handling_support; pub fn maybeEnableSegfaultHandler() void { if (enable_segfault_handler) { |
