diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-08-12 11:30:55 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-08-12 11:30:55 -0700 |
| commit | 0961c1975a74acdc344be11ffbb4b11e033c8df0 (patch) | |
| tree | 8a312bb51500e938f137c2de895eb38b0899c4a9 /tools/update_cpu_features.zig | |
| parent | 55c6a784a5bdf37c90cc9d8f55e9a86d396b8af4 (diff) | |
| download | zig-0961c1975a74acdc344be11ffbb4b11e033c8df0.tar.gz zig-0961c1975a74acdc344be11ffbb4b11e033c8df0.zip | |
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 (limited to 'tools/update_cpu_features.zig')
| -rw-r--r-- | tools/update_cpu_features.zig | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tools/update_cpu_features.zig b/tools/update_cpu_features.zig index e01cd62ed9..34cf6c59b6 100644 --- 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(); |
