Commit cfc31b5bbd

Andrew Kelley <andrew@ziglang.org>
2022-03-16 03:42:48
std.dwarf: avoid some async/await stuff in stage2 builds
1 parent 2583be7
Changed files (1)
lib
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);