diff options
| author | Jacob Young <amazingjacob@gmail.com> | 2025-01-10 15:36:21 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-10 15:36:21 -0500 |
| commit | 6cfc9c0e02cb1ccf9edfbdc64fcca285fea022fb (patch) | |
| tree | 24805abd8c8d59ce75c8de4c057482a7e1dc5399 /src/Compilation.zig | |
| parent | b36ea592b86ef20473697ded24a27bb644941de8 (diff) | |
| parent | 02692ad78cbdc1086abc4e37739e512c9203f486 (diff) | |
| download | zig-6cfc9c0e02cb1ccf9edfbdc64fcca285fea022fb.tar.gz zig-6cfc9c0e02cb1ccf9edfbdc64fcca285fea022fb.zip | |
Merge pull request #22459 from jacobly0/fix-miscomps
cbe/x86_64: fix more miscomps
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, |
