authorgravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2023-11-08 07:44:48-05:00
committergravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2023-11-08 08:40:10-05:00
log6c15c34421bbecb8eba7abf56e277ec26a4f018c
treeee915230dfdc3e0670c8ec70199f922b80e81c40
parent8f2aa72af7695dc8fba9946b60129a4f615d6727

MachO: support `-fsingle-threaded` mode


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

src/link/MachO/uuid.zig+1-1
...@@ -5,7 +5,7 @@...@@ -5,7 +5,7 @@
5/// TODO LLD also hashes the output filename to disambiguate between same builds with different5/// TODO LLD also hashes the output filename to disambiguate between same builds with different
6/// output files. Should we also do that?6/// output files. Should we also do that?
7pub fn calcUuid(comp: *const Compilation, file: fs.File, file_size: u64, out: *[Md5.digest_length]u8) !void {7pub fn calcUuid(comp: *const Compilation, file: fs.File, file_size: u64, out: *[Md5.digest_length]u8) !void {
8 const num_chunks = comp.thread_pool.threads.len * 0x10;8 const num_chunks = @max(comp.thread_pool.threads.len, 1) * 0x10;
9 const chunk_size = @divTrunc(file_size, num_chunks);9 const chunk_size = @divTrunc(file_size, num_chunks);
10 const actual_num_chunks = if (@rem(file_size, num_chunks) > 0) num_chunks + 1 else num_chunks;10 const actual_num_chunks = if (@rem(file_size, num_chunks) > 0) num_chunks + 1 else num_chunks;
1111