aboutsummaryrefslogtreecommitdiff
path: root/src/target.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-07-13 12:53:46 -0700
committerAndrew Kelley <andrew@ziglang.org>2025-07-14 09:26:24 +0200
commit2f3cd175d3fc74be8318c07d943c8d5d067085b3 (patch)
treee352a45e28c861e3200892005be22eca2c72f3bd /src/target.zig
parent5a8acc91158e84d1478478cbf6aa510091708b93 (diff)
downloadzig-2f3cd175d3fc74be8318c07d943c8d5d067085b3.tar.gz
zig-2f3cd175d3fc74be8318c07d943c8d5d067085b3.zip
compiler: raise the bar for backend contributions
Diffstat (limited to 'src/target.zig')
-rw-r--r--src/target.zig12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/target.zig b/src/target.zig
index 8c33a26939..dcacc65fad 100644
--- a/src/target.zig
+++ b/src/target.zig
@@ -868,10 +868,16 @@ pub inline fn backendSupportsFeature(backend: std.builtin.CompilerBackend, compt
else => false,
},
.separate_thread => switch (backend) {
+ // Supports a separate thread but does not support N separate
+ // threads because they would all just be locking the same mutex to
+ // protect Builder.
.stage2_llvm => false,
- .stage2_c, .stage2_wasm, .stage2_x86_64 => true,
- // TODO: most self-hosted backends should be able to support this without too much work.
- else => false,
+ // Same problem. Frontend needs to allow this backend to run in the
+ // linker thread.
+ .stage2_spirv => false,
+ // Please do not make any more exceptions. Backends must support
+ // being run in a separate thread from now on.
+ else => true,
},
};
}