diff options
| author | Robin Voetter <robin@voetter.nl> | 2024-06-11 08:21:04 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-11 08:21:04 +0200 |
| commit | d9bd34fd0533295044ffb4160da41f7873aff905 (patch) | |
| tree | ff2c582f019497134ad8d81f7bbb422c87d8b3d3 /lib/std/Build.zig | |
| parent | d4bc64038ce40ac3829c3f1d0dc21dfb7484818c (diff) | |
| parent | a567f3871ec06f3e6a8c0e6424aba556f1069ccc (diff) | |
| download | zig-d9bd34fd0533295044ffb4160da41f7873aff905.tar.gz zig-d9bd34fd0533295044ffb4160da41f7873aff905.zip | |
Merge pull request #20247 from Snektron/spirv-vectors-v3
spirv: vectors v3
Diffstat (limited to 'lib/std/Build.zig')
| -rw-r--r-- | lib/std/Build.zig | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/lib/std/Build.zig b/lib/std/Build.zig index 698aa3af34..086c0c1786 100644 --- a/lib/std/Build.zig +++ b/lib/std/Build.zig @@ -972,10 +972,24 @@ pub fn addRunArtifact(b: *Build, exe: *Step.Compile) *Step.Run { // Consider that this is declarative; the run step may not be run unless a user // option is supplied. const run_step = Step.Run.create(b, b.fmt("run {s}", .{exe.name})); - run_step.addArtifactArg(exe); + if (exe.kind == .@"test") { + if (exe.exec_cmd_args) |exec_cmd_args| { + for (exec_cmd_args) |cmd_arg| { + if (cmd_arg) |arg| { + run_step.addArg(arg); + } else { + run_step.addArtifactArg(exe); + } + } + } else { + run_step.addArtifactArg(exe); + } - if (exe.kind == .@"test" and exe.test_server_mode) { - run_step.enableTestRunnerMode(); + if (exe.test_server_mode) { + run_step.enableTestRunnerMode(); + } + } else { + run_step.addArtifactArg(exe); } return run_step; |
