diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2025-01-10 03:24:44 -0500 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2025-01-10 06:10:15 -0500 |
| commit | 02692ad78cbdc1086abc4e37739e512c9203f486 (patch) | |
| tree | 24805abd8c8d59ce75c8de4c057482a7e1dc5399 /src/Compilation.zig | |
| parent | 4e581427d1fee46cdcab088cb2c1d7ad51b06239 (diff) | |
| download | zig-02692ad78cbdc1086abc4e37739e512c9203f486.tar.gz zig-02692ad78cbdc1086abc4e37739e512c9203f486.zip | |
cbe: fix miscomps of the compiler
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 241386f10c..7ec0640256 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -251,7 +251,12 @@ reference_trace: ?u32 = null, libcxx_abi_version: libcxx.AbiVersion = libcxx.AbiVersion.default, /// This mutex guards all `Compilation` mutable state. -mutex: std.Thread.Mutex = .{}, +/// Disabled in single-threaded mode because the thread pool spawns in the same thread. +mutex: if (builtin.single_threaded) struct { + pub inline fn tryLock(_: @This()) void {} + pub inline fn lock(_: @This()) void {} + pub inline fn unlock(_: @This()) void {} +} else std.Thread.Mutex = .{}, test_filters: []const []const u8, test_name_prefix: ?[]const u8, |
