authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-08-12 11:30:55-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-08-12 11:30:55-07:00
log0961c1975a74acdc344be11ffbb4b11e033c8df0
tree8a312bb51500e938f137c2de895eb38b0899c4a9
parent55c6a784a5bdf37c90cc9d8f55e9a86d396b8af4

update_cpu_features tool: work around stage1 bug

This works around a stage1 compiler bug resulting in a segfault when trying to use the tool.

1 files changed, 8 insertions(+), 9 deletions(-)

tools/update_cpu_features.zig+8-9
...@@ -818,15 +818,14 @@ pub fn main() anyerror!void {...@@ -818,15 +818,14 @@ pub fn main() anyerror!void {
818 } else {818 } else {
819 var threads = try arena.alloc(std.Thread, llvm_targets.len);819 var threads = try arena.alloc(std.Thread, llvm_targets.len);
820 for (llvm_targets) |llvm_target, i| {820 for (llvm_targets) |llvm_target, i| {
821 threads[i] = try std.Thread.spawn(.{}, processOneTarget, .{821 const job = Job{
822 Job{822 .llvm_tblgen_exe = llvm_tblgen_exe,
823 .llvm_tblgen_exe = llvm_tblgen_exe,823 .llvm_src_root = llvm_src_root,
824 .llvm_src_root = llvm_src_root,824 .zig_src_dir = zig_src_dir,
825 .zig_src_dir = zig_src_dir,825 .root_progress = root_progress,
826 .root_progress = root_progress,826 .llvm_target = llvm_target,
827 .llvm_target = llvm_target,827 };
828 },828 threads[i] = try std.Thread.spawn(.{}, processOneTarget, .{job});
829 });
830 }829 }
831 for (threads) |thread| {830 for (threads) |thread| {
832 thread.join();831 thread.join();