diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2024-07-08 09:05:30 -0400 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2024-07-08 11:00:38 -0400 |
| commit | 65ced4a33436fa762de75e22a986ae08a8c0d9cc (patch) | |
| tree | d19b6b0cdb71a7e0f6bc65379441992753979a4a /src/Zcu.zig | |
| parent | c36e2bb9802ab4317980a98ea518483010fe2c80 (diff) | |
| download | zig-65ced4a33436fa762de75e22a986ae08a8c0d9cc.tar.gz zig-65ced4a33436fa762de75e22a986ae08a8c0d9cc.zip | |
Compilation: put supported codegen backends on a separate thread
(There are no supported backends.)
Diffstat (limited to 'src/Zcu.zig')
| -rw-r--r-- | src/Zcu.zig | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Zcu.zig b/src/Zcu.zig index b855e4fcf0..2f87bcca0f 100644 --- a/src/Zcu.zig +++ b/src/Zcu.zig @@ -64,8 +64,8 @@ root_mod: *Package.Module, /// `root_mod` is the test runner, and `main_mod` is the user's source file which has the tests. main_mod: *Package.Module, std_mod: *Package.Module, -sema_prog_node: std.Progress.Node = undefined, -codegen_prog_node: std.Progress.Node = undefined, +sema_prog_node: std.Progress.Node = std.Progress.Node.none, +codegen_prog_node: std.Progress.Node = std.Progress.Node.none, /// Used by AstGen worker to load and store ZIR cache. global_zir_cache: Compilation.Directory, @@ -3557,13 +3557,13 @@ pub const Feature = enum { /// to generate better machine code in the backends. All backends should migrate to /// enabling this feature. safety_checked_instructions, + /// If the backend supports running from another thread. + separate_thread, }; -pub fn backendSupportsFeature(zcu: Module, feature: Feature) bool { - const cpu_arch = zcu.root_mod.resolved_target.result.cpu.arch; - const ofmt = zcu.root_mod.resolved_target.result.ofmt; - const use_llvm = zcu.comp.config.use_llvm; - return target_util.backendSupportsFeature(cpu_arch, ofmt, use_llvm, feature); +pub fn backendSupportsFeature(zcu: Module, comptime feature: Feature) bool { + const backend = target_util.zigBackend(zcu.root_mod.resolved_target.result, zcu.comp.config.use_llvm); + return target_util.backendSupportsFeature(backend, feature); } pub const AtomicPtrAlignmentError = error{ |
