| ... | ... | @@ -152,8 +152,14 @@ var general_purpose_allocator = std.heap.GeneralPurposeAllocator(.{ |
| 152 | 152 | pub fn main() anyerror!void { |
| 153 | 153 | crash_report.initialize(); |
| 154 | 154 | |
| 155 | | const use_gpa = build_options.force_gpa or !builtin.link_libc; |
| 155 | const use_gpa = (build_options.force_gpa or !builtin.link_libc) and builtin.os.tag != .wasi; |
| 156 | 156 | const gpa = gpa: { |
| 157 | if (builtin.os.tag == .wasi) { |
| 158 | break :gpa Allocator{ |
| 159 | .ptr = undefined, |
| 160 | .vtable = &std.heap.WasmAllocator.vtable, |
| 161 | }; |
| 162 | } |
| 157 | 163 | if (use_gpa) { |
| 158 | 164 | break :gpa general_purpose_allocator.allocator(); |
| 159 | 165 | } |