std.Build.Step.Options: clear content on rerun

This commit is contained in:
Zihad 2025-12-03 00:44:41 +06:00
parent 52ad126bb4
commit bbbbb87b99
No known key found for this signature in database

View file

@ -443,6 +443,9 @@ fn make(step: *Step, make_options: Step.MakeOptions) !void {
const b = step.owner; const b = step.owner;
const options: *Options = @fieldParentPtr("step", step); const options: *Options = @fieldParentPtr("step", step);
// There might be content already, for example from previous run in watch mode
options.contents.clearRetainingCapacity();
for (options.args.items) |item| { for (options.args.items) |item| {
options.addOption( options.addOption(
[]const u8, []const u8,