aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index 2ab9dde35c..30d825b9c6 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -3199,6 +3199,13 @@ fn processOneJob(comp: *Compilation, job: Job, prog_node: *std.Progress.Node) !v
error.OutOfMemory => return error.OutOfMemory,
error.AnalysisFail => return,
};
+ const decl = module.declPtr(decl_index);
+ if (decl.kind == .@"test" and comp.bin_file.options.is_test) {
+ // Tests are always emitted in test binaries. The decl_refs are created by
+ // Module.populateTestFunctions, but this will not queue body analysis, so do
+ // that now.
+ try module.ensureFuncBodyAnalysisQueued(decl.val.castTag(.function).?.data);
+ }
},
.update_embed_file => |embed_file| {
const named_frame = tracy.namedFrame("update_embed_file");