From 10b56b21d4f37f7a79562deb3bc6a53ce6da0eb0 Mon Sep 17 00:00:00 2001 From: Luuk de Gram Date: Tue, 18 Oct 2022 17:15:58 +0200 Subject: [PATCH] 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. --- lib/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 index eaa3a1c1b7..315bbd9b03 100644 --- 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: