commit cfc31b5bbdf67632626eb934886cdeaefe40e595 (tree)
parent 2583be7585d66ff6962434c7861db9b50aa64154
Author: Andrew Kelley <andrew@ziglang.org>
Date: Tue, 15 Mar 2022 19:42:48 -0700
std.dwarf: avoid some async/await stuff in stage2 builds
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/lib/std/dwarf.zig b/lib/std/dwarf.zig
@@ -1,3 +1,4 @@
+const builtin = @import("builtin");
const std = @import("std.zig");
const debug = std.debug;
const fs = std.fs;
@@ -502,6 +503,9 @@ fn parseFormValue(allocator: mem.Allocator, in_stream: anytype, form_id: u64, en
FORM.line_strp => FormValue{ .LineStrPtr = try readAddress(in_stream, endian, is_64) },
FORM.indirect => {
const child_form_id = try nosuspend leb.readULEB128(u64, in_stream);
+ if (builtin.zig_backend != .stage1) {
+ return parseFormValue(allocator, in_stream, child_form_id, endian, is_64);
+ }
const F = @TypeOf(async parseFormValue(allocator, in_stream, child_form_id, endian, is_64));
var frame = try allocator.create(F);
defer allocator.destroy(frame);