| author | |
| committer | |
| log | d3363b7a61cc0833d6eb60077b90cf12b95155f0 |
| tree | bfaa01885576ed88f140a2a7b354e07fc8b62fcd |
| parent | 6322dbd5bf112356efdf2ec64c5471d6e8586a74 |
This new error mirrors the error returned from the Elf struct (error.UnsupportedElfArchitecture):
https://github.com/ziglang/zig/blob/0adcfd60f4fcfd01c74a6477cbcef187ce06f533/src/link/Lld.zig#L112
Before:
```
$ zig build-exe -target riscv64-windows-gnu main.zig
thread 543087 panic: reached unreachable code
```
After:
```
$ zig build-exe -target riscv64-windows-gnu main.zig
error: unable to create compilation: UnsupportedCoffArchitecture
```
Closes #242871 files changed, 2 insertions(+), 2 deletions(-)
src/link/Lld.zig+2-2| ... | ... | @@ -37,12 +37,12 @@ const Coff = struct { |
| 37 | 37 | .Exe => switch (target.cpu.arch) { |
| 38 | 38 | .aarch64, .x86_64 => 0x140000000, |
| 39 | 39 | .thumb, .x86 => 0x400000, |
| 40 | else => unreachable, | |
| 40 | else => return error.UnsupportedCoffArchitecture, | |
| 41 | 41 | }, |
| 42 | 42 | .Lib => switch (target.cpu.arch) { |
| 43 | 43 | .aarch64, .x86_64 => 0x180000000, |
| 44 | 44 | .thumb, .x86 => 0x10000000, |
| 45 | else => unreachable, | |
| 45 | else => return error.UnsupportedCoffArchitecture, | |
| 46 | 46 | }, |
| 47 | 47 | .Obj => 0, |
| 48 | 48 | }, |