diff options
| author | David Rubin <daviru007@icloud.com> | 2024-03-25 05:30:12 -0700 |
|---|---|---|
| committer | David Rubin <daviru007@icloud.com> | 2024-05-11 02:17:11 -0700 |
| commit | 685f8282180016ac8d82ecf2fe7facc1a2d6b9f7 (patch) | |
| tree | 620d40ac62344a8e0bf97274b60d28ed7daa0da7 /src/target.zig | |
| parent | b28c966e332623dc43b1481b34016d18ce3262fa (diff) | |
| download | zig-685f8282180016ac8d82ecf2fe7facc1a2d6b9f7.tar.gz zig-685f8282180016ac8d82ecf2fe7facc1a2d6b9f7.zip | |
riscv: add a custom panic function
this provides a much better indication of when we are having a controlled panic with an error message
or when we are actually segfaulting, as before the `trap` as causing a segfault.
Diffstat (limited to 'src/target.zig')
| -rw-r--r-- | src/target.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target.zig b/src/target.zig index ea58111bc1..8f61b2ba03 100644 --- a/src/target.zig +++ b/src/target.zig @@ -526,7 +526,7 @@ pub fn backendSupportsFeature( feature: Feature, ) bool { return switch (feature) { - .panic_fn => ofmt == .c or use_llvm or cpu_arch == .x86_64, + .panic_fn => ofmt == .c or use_llvm or cpu_arch == .x86_64 or cpu_arch == .riscv64, .panic_unwrap_error => ofmt == .c or use_llvm, .safety_check_formatted => ofmt == .c or use_llvm, .error_return_trace => use_llvm, |
