mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-09 08:30:00 +00:00
pass -freference-trace to executed compile command
Currently users executing `zig build` to run the exercises, may encounter compiler output that tells them to use `-freference-trace=[num]` to see more of the hidden reference traces, so we should pass this parameter to the zigling exercise being compiled, so that the learner can provide this parameter like they would normally, when using `zig build` directly in normal Zig programs.
This commit is contained in:
@@ -508,6 +508,10 @@ const ZiglingStep = struct {
|
||||
zig_args.append("-lc") catch @panic("OOM");
|
||||
}
|
||||
|
||||
if (b.reference_trace) |rt| {
|
||||
zig_args.append(b.fmt("-freference-trace={}", .{rt})) catch @panic("OOM");
|
||||
}
|
||||
|
||||
zig_args.append(b.pathFromRoot(path)) catch @panic("OOM");
|
||||
|
||||
zig_args.append("--cache-dir") catch @panic("OOM");
|
||||
|
||||
Reference in New Issue
Block a user