Extracted from #14647.
Add a --seed option to the build runner and make the zig build subcommand always supply a random seed argument.
Use this seed to shuffle the dependency order of steps when -j1 is selected, and ideally also shuffle order of steps for dependency peers when concurrency is being used. Be sure not to disrupt the heuristics for starting leaf dependencies first when the number of threads in the thread pool is greater than one.
This will help protect build scripts from accumulating concurrency bugs.
Extracted from #14647.
Add a --seed option to the build runner and make the
zig buildsubcommand always supply a random seed argument.Use this seed to shuffle the dependency order of steps when -j1 is selected, and ideally also shuffle order of steps for dependency peers when concurrency is being used. Be sure not to disrupt the heuristics for starting leaf dependencies first when the number of threads in the thread pool is greater than one.
This will help protect build scripts from accumulating concurrency bugs.