zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 10b56b21d4f37f7a79562deb3bc6a53ce6da0eb0 (tree)
parent 687a7d38a00e187a75c43617d8de6fefaffb5449
Author: Luuk de Gram <luuk@degram.dev>
Date:   Tue, 18 Oct 2022 17:15:58 +0200

CheckObjectStep: correctly depend on its own step

When creating an `EmulatableRunStep`, it now correctly depends
on its own step rather than only the executable that was created.
This means we do not need to add extra `dependOn` statements on
both the emulatable step as well as the check object step.

Diffstat:
Mlib/std/build/CheckObjectStep.zig | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/std/build/CheckObjectStep.zig b/lib/std/build/CheckObjectStep.zig @@ -45,7 +45,9 @@ pub fn runAndCompare(self: *CheckObjectStep) *EmulatableRunStep { assert(dependencies_len > 0); const exe_step = self.step.dependencies.items[dependencies_len - 1]; const exe = exe_step.cast(std.build.LibExeObjStep).?; - return EmulatableRunStep.create(self.builder, "EmulatableRun", exe); + const emulatable_step = EmulatableRunStep.create(self.builder, "EmulatableRun", exe); + emulatable_step.step.dependOn(&self.step); + return emulatable_step; } /// There two types of actions currently suported: