mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
compiler: raise the bar for backend contributions
This commit is contained in:
parent
5a8acc9115
commit
2f3cd175d3
1 changed files with 9 additions and 3 deletions
|
|
@ -868,10 +868,16 @@ pub inline fn backendSupportsFeature(backend: std.builtin.CompilerBackend, compt
|
||||||
else => false,
|
else => false,
|
||||||
},
|
},
|
||||||
.separate_thread => switch (backend) {
|
.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_llvm => false,
|
||||||
.stage2_c, .stage2_wasm, .stage2_x86_64 => true,
|
// Same problem. Frontend needs to allow this backend to run in the
|
||||||
// TODO: most self-hosted backends should be able to support this without too much work.
|
// linker thread.
|
||||||
else => false,
|
.stage2_spirv => false,
|
||||||
|
// Please do not make any more exceptions. Backends must support
|
||||||
|
// being run in a separate thread from now on.
|
||||||
|
else => true,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue