aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2024-06-15 16:10:53 -0400
committerJacob Young <jacobly0@users.noreply.github.com>2024-07-07 22:59:52 -0400
commit525f341f33af9b8aad53931fd5511f00a82cb090 (patch)
treecec3280498c1122858580946ac5e31f8feb807ce /src/main.zig
parent8f20e81b8816aadd8ceb1b04bd3727cc1d124464 (diff)
downloadzig-525f341f33af9b8aad53931fd5511f00a82cb090.tar.gz
zig-525f341f33af9b8aad53931fd5511f00a82cb090.zip
Zcu: introduce `PerThread` and pass to all the functions
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.zig b/src/main.zig
index 3ba1276abf..9fd9087b63 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -172,7 +172,7 @@ pub fn main() anyerror!void {
}
// We would prefer to use raw libc allocator here, but cannot
// use it if it won't support the alignment we need.
- if (@alignOf(std.c.max_align_t) < @alignOf(i128)) {
+ if (@alignOf(std.c.max_align_t) < @max(@alignOf(i128), std.atomic.cache_line)) {
break :gpa std.heap.c_allocator;
}
break :gpa std.heap.raw_c_allocator;
@@ -3092,7 +3092,7 @@ fn buildOutputType(
defer emit_implib_resolved.deinit();
var thread_pool: ThreadPool = undefined;
- try thread_pool.init(.{ .allocator = gpa });
+ try thread_pool.init(.{ .allocator = gpa, .track_ids = true });
defer thread_pool.deinit();
var cleanup_local_cache_dir: ?fs.Dir = null;
@@ -4895,7 +4895,7 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !void {
child_argv.items[argv_index_cache_dir] = local_cache_directory.path orelse cwd_path;
var thread_pool: ThreadPool = undefined;
- try thread_pool.init(.{ .allocator = gpa });
+ try thread_pool.init(.{ .allocator = gpa, .track_ids = true });
defer thread_pool.deinit();
// Dummy http client that is not actually used when only_core_functionality is enabled.
@@ -5329,7 +5329,7 @@ fn jitCmd(
defer global_cache_directory.handle.close();
var thread_pool: ThreadPool = undefined;
- try thread_pool.init(.{ .allocator = gpa });
+ try thread_pool.init(.{ .allocator = gpa, .track_ids = true });
defer thread_pool.deinit();
var child_argv: std.ArrayListUnmanaged([]const u8) = .{};