Skip to content

Commit

Permalink
build.zig: allow run() on non-native target artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrk committed Mar 19, 2019
1 parent 9801a1d commit ac34841
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion std/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,9 @@ pub const LibExeObjStep = struct {
/// Add command line arguments with `addArg`.
pub fn run(exe: *LibExeObjStep) *RunStep {
assert(exe.kind == Kind.Exe);
assert(exe.target == Target.Native);
// It doesn't have to be native. We catch that if you actually try to run it.
// Consider that this is declarative; the run step may not be run unless a user
// option is supplied.
const run_step = RunStep.create(exe.builder, exe.builder.fmt("run {}", exe.step.name));
run_step.addArtifactArg(exe);
return run_step;
Expand Down

0 comments on commit ac34841

Please sign in to comment.