zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 0961c1975a74acdc344be11ffbb4b11e033c8df0 (tree)
parent 55c6a784a5bdf37c90cc9d8f55e9a86d396b8af4
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Thu, 12 Aug 2021 11:30:55 -0700

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.

Diffstat:
Mtools/update_cpu_features.zig | 17++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/tools/update_cpu_features.zig b/tools/update_cpu_features.zig @@ -818,15 +818,14 @@ pub fn main() anyerror!void { } else { var threads = try arena.alloc(std.Thread, llvm_targets.len); for (llvm_targets) |llvm_target, i| { - threads[i] = try std.Thread.spawn(.{}, processOneTarget, .{ - Job{ - .llvm_tblgen_exe = llvm_tblgen_exe, - .llvm_src_root = llvm_src_root, - .zig_src_dir = zig_src_dir, - .root_progress = root_progress, - .llvm_target = llvm_target, - }, - }); + const job = Job{ + .llvm_tblgen_exe = llvm_tblgen_exe, + .llvm_src_root = llvm_src_root, + .zig_src_dir = zig_src_dir, + .root_progress = root_progress, + .llvm_target = llvm_target, + }; + threads[i] = try std.Thread.spawn(.{}, processOneTarget, .{job}); } for (threads) |thread| { thread.join();