| author | |
| committer | |
| log | 7d6596e979df799782b77ce3fed722b792509388 |
| tree | 3f930a1e6f13c9d3dd6fea4ff096b1a8eda7d3c9 |
| parent | 1952dd6437a73e3de211b649924a55fcb6e030be |
| parent | c0fe135ff3ec09c71103f382cdca60506b557e57 |
| signature |
std: CheckObject - correctly depend on its own step when creating an EmulatableRunStep8 files changed, 3 insertions(+), 11 deletions(-)
lib/std/build/CheckObjectStep.zig+3-1| ... | ... | @@ -45,7 +45,9 @@ pub fn runAndCompare(self: *CheckObjectStep) *EmulatableRunStep { |
| 45 | 45 | assert(dependencies_len > 0); |
| 46 | 46 | const exe_step = self.step.dependencies.items[dependencies_len - 1]; |
| 47 | 47 | const exe = exe_step.cast(std.build.LibExeObjStep).?; |
| 48 | return EmulatableRunStep.create(self.builder, "EmulatableRun", exe); | |
| 48 | const emulatable_step = EmulatableRunStep.create(self.builder, "EmulatableRun", exe); | |
| 49 | emulatable_step.step.dependOn(&self.step); | |
| 50 | return emulatable_step; | |
| 49 | 51 | } |
| 50 | 52 | |
| 51 | 53 | /// There two types of actions currently suported: |
test/link/macho/dead_strip/build.zig-2| ... | ... | @@ -16,7 +16,6 @@ pub fn build(b: *Builder) void { |
| 16 | 16 | const check = exe.checkObject(.macho); |
| 17 | 17 | check.checkInSymtab(); |
| 18 | 18 | check.checkNext("{*} (__TEXT,__text) external _iAmUnused"); |
| 19 | test_step.dependOn(&check.step); | |
| 20 | 19 | |
| 21 | 20 | const run_cmd = check.runAndCompare(); |
| 22 | 21 | run_cmd.expectStdOutEqual("Hello!\n"); |
| ... | ... | @@ -31,7 +30,6 @@ pub fn build(b: *Builder) void { |
| 31 | 30 | const check = exe.checkObject(.macho); |
| 32 | 31 | check.checkInSymtab(); |
| 33 | 32 | check.checkNotPresent("{*} (__TEXT,__text) external _iAmUnused"); |
| 34 | test_step.dependOn(&check.step); | |
| 35 | 33 | |
| 36 | 34 | const run_cmd = check.runAndCompare(); |
| 37 | 35 | run_cmd.expectStdOutEqual("Hello!\n"); |
test/link/macho/dylib/build.zig-2| ... | ... | @@ -40,8 +40,6 @@ pub fn build(b: *Builder) void { |
| 40 | 40 | check_exe.checkNext("current version 10000"); |
| 41 | 41 | check_exe.checkNext("compatibility version 10000"); |
| 42 | 42 | |
| 43 | test_step.dependOn(&check_exe.step); | |
| 44 | ||
| 45 | 43 | check_exe.checkStart("cmd RPATH"); |
| 46 | 44 | check_exe.checkNext(std.fmt.allocPrint(b.allocator, "path {s}", .{b.pathFromRoot("zig-out/lib")}) catch unreachable); |
| 47 | 45 |
test/link/macho/entry/build.zig-1| ... | ... | @@ -26,7 +26,6 @@ pub fn build(b: *Builder) void { |
| 26 | 26 | check_exe.checkNext("{n_value} (__TEXT,__text) external _non_main"); |
| 27 | 27 | |
| 28 | 28 | check_exe.checkComputeCompare("vmaddr entryoff +", .{ .op = .eq, .value = .{ .variable = "n_value" } }); |
| 29 | test_step.dependOn(&check_exe.step); | |
| 30 | 29 | |
| 31 | 30 | const run = check_exe.runAndCompare(); |
| 32 | 31 | run.expectStdOutEqual("42"); |
test/link/macho/needed_library/build.zig-1| ... | ... | @@ -31,7 +31,6 @@ pub fn build(b: *Builder) void { |
| 31 | 31 | const check = exe.checkObject(.macho); |
| 32 | 32 | check.checkStart("cmd LOAD_DYLIB"); |
| 33 | 33 | check.checkNext("name @rpath/liba.dylib"); |
| 34 | test_step.dependOn(&check.step); | |
| 35 | 34 | |
| 36 | 35 | const run_cmd = check.runAndCompare(); |
| 37 | 36 | test_step.dependOn(&run_cmd.step); |
test/link/macho/search_strategy/build.zig-1| ... | ... | @@ -17,7 +17,6 @@ pub fn build(b: *Builder) void { |
| 17 | 17 | const check = exe.checkObject(.macho); |
| 18 | 18 | check.checkStart("cmd LOAD_DYLIB"); |
| 19 | 19 | check.checkNext("name @rpath/liba.dylib"); |
| 20 | test_step.dependOn(&check.step); | |
| 21 | 20 | |
| 22 | 21 | const run = check.runAndCompare(); |
| 23 | 22 | run.cwd = b.pathFromRoot("."); |
test/link/macho/stack_size/build.zig-1| ... | ... | @@ -18,7 +18,6 @@ pub fn build(b: *Builder) void { |
| 18 | 18 | const check_exe = exe.checkObject(.macho); |
| 19 | 19 | check_exe.checkStart("cmd MAIN"); |
| 20 | 20 | check_exe.checkNext("stacksize 100000000"); |
| 21 | test_step.dependOn(&check_exe.step); | |
| 22 | 21 | |
| 23 | 22 | const run = check_exe.runAndCompare(); |
| 24 | 23 | test_step.dependOn(&run.step); |
test/link/macho/weak_library/build.zig-2| ... | ... | @@ -33,8 +33,6 @@ pub fn build(b: *Builder) void { |
| 33 | 33 | check.checkNext("(undefined) weak external _a (from liba)"); |
| 34 | 34 | check.checkNext("(undefined) weak external _asStr (from liba)"); |
| 35 | 35 | |
| 36 | test_step.dependOn(&check.step); | |
| 37 | ||
| 38 | 36 | const run_cmd = check.runAndCompare(); |
| 39 | 37 | run_cmd.expectStdOutEqual("42 42"); |
| 40 | 38 | test_step.dependOn(&run_cmd.step); |