diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-03-19 17:08:50 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-03-19 17:08:50 -0400 |
| commit | ac34841270d34fb2f47ada2960d7281328ec7b25 (patch) | |
| tree | 036c1704ec98368c312dd243279b98d138b74dba /std | |
| parent | 9801a1df6a6a55bb98cb4141d7e8f7340f324de2 (diff) | |
| download | zig-ac34841270d34fb2f47ada2960d7281328ec7b25.tar.gz zig-ac34841270d34fb2f47ada2960d7281328ec7b25.zip | |
build.zig: allow run() on non-native target artifacts
Diffstat (limited to 'std')
| -rw-r--r-- | std/build.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/std/build.zig b/std/build.zig index 558372b788..0f88d09c2a 100644 --- a/std/build.zig +++ b/std/build.zig @@ -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; |
