authorgravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2024-07-07 13:18:53-04:00
committergravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2024-07-07 22:59:52-04:00
log166402c16bddccc364b9108a9e69af3a0dd6f1ab
tree4557630cf8d32fbcf54e30c687819638615e122d
parentbdae01ab047accbbc6dcd014d008f2554aa78696

bootstrap: fix build


2 files changed, 7 insertions(+), 2 deletions(-)

lib/std/Thread.zig+6-1
......@@ -280,12 +280,13 @@ pub fn getCurrentId() Id {
280280pub const CpuCountError = error{
281281 PermissionDenied,
282282 SystemResources,
283 Unsupported,
283284 Unexpected,
284285};
285286
286287/// Returns the platforms view on the number of logical CPU cores available.
287288pub fn getCpuCount() CpuCountError!usize {
288 return Impl.getCpuCount();
289 return try Impl.getCpuCount();
289290}
290291
291292/// Configuration options for hints on how to spawn threads.
......@@ -782,6 +783,10 @@ const WasiThreadImpl = struct {
782783 return tls_thread_id;
783784 }
784785
786 fn getCpuCount() error{Unsupported}!noreturn {
787 return error.Unsupported;
788 }
789
785790 fn getHandle(self: Impl) ThreadHandle {
786791 return self.thread.tid.load(.seq_cst);
787792 }
src/link.zig+1-1
......@@ -538,7 +538,7 @@ pub const File = struct {
538538 pub fn flush(base: *File, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: std.Progress.Node) FlushError!void {
539539 if (build_options.only_c) {
540540 assert(base.tag == .c);
541 return @as(*C, @fieldParentPtr("base", base)).flush(arena, prog_node);
541 return @as(*C, @fieldParentPtr("base", base)).flush(arena, tid, prog_node);
542542 }
543543 const comp = base.comp;
544544 if (comp.clang_preprocessor_mode == .yes or comp.clang_preprocessor_mode == .pch) {