@@ -188,12 +188,28 @@ fn bootstrapDepotTools(b: *std.Build, depot_tools_dir: []const u8) !*std.Build.S
188188 copy_depot_tools .addDirectoryArg (depot_tools .path ("" ));
189189 copy_depot_tools .addArg (depot_tools_dir );
190190
191+ const build_telemetry_config_content =
192+ \\ {
193+ \\ "user": "lightpanda",
194+ \\ "status": "opt-out",
195+ \\ "countdown": 20,
196+ \\ "version": 1
197+ \\ }
198+ ;
199+
200+ const write_telemetry_config = b .addSystemCommand (&.{ "sh" , "-c" });
201+ write_telemetry_config .addArg (b .fmt ("echo '{s}' > {s}/build_telemetry.cfg" , .{
202+ build_telemetry_config_content ,
203+ depot_tools_dir ,
204+ }));
205+ write_telemetry_config .step .dependOn (& copy_depot_tools .step );
206+
191207 const ensure_bootstrap = b .addSystemCommand (&.{
192208 getDepotToolExePath (b , depot_tools_dir , "ensure_bootstrap" ),
193209 });
194210 ensure_bootstrap .setCwd (.{ .cwd_relative = depot_tools_dir });
195211 addDepotToolsToPath (ensure_bootstrap , depot_tools_dir );
196- ensure_bootstrap .step .dependOn (& copy_depot_tools .step );
212+ ensure_bootstrap .step .dependOn (& write_telemetry_config .step );
197213
198214 const create_marker = b .addSystemCommand (&.{ "touch" , marker_file });
199215 create_marker .step .dependOn (& ensure_bootstrap .step );
@@ -400,22 +416,6 @@ fn buildV8(
400416 addDepotToolsToPath (gn_run , depot_tools_dir );
401417 gn_run .step .dependOn (& bootstrapped_v8 .step );
402418
403- const build_telemetry_config_content =
404- \\ {
405- \\ "user": "lightpanda",
406- \\ "status": "opt-out",
407- \\ "countdown": 20,
408- \\ "version": 1
409- \\ }
410- ;
411-
412- const write_telemetry_config = b .addSystemCommand (&.{ "sh" , "-c" });
413- write_telemetry_config .addArg (b .fmt ("echo '{s}' > {s}" , .{
414- build_telemetry_config_content ,
415- getDepotToolExePath (b , depot_tools_dir , "build_telemetry.cfg" ),
416- }));
417- write_telemetry_config .step .dependOn (& gn_run .step );
418-
419419 const ninja_run = b .addSystemCommand (&.{
420420 getDepotToolExePath (b , depot_tools_dir , "autoninja" ),
421421 "-C" ,
@@ -424,7 +424,7 @@ fn buildV8(
424424 });
425425 ninja_run .setCwd (v8_dir_lazy_path );
426426 addDepotToolsToPath (ninja_run , depot_tools_dir );
427- ninja_run .step .dependOn (& write_telemetry_config .step );
427+ ninja_run .step .dependOn (& gn_run .step );
428428
429429 const wf = b .addWriteFiles ();
430430 wf .step .dependOn (& ninja_run .step );
0 commit comments