authorgravatar for kcbanner@gmail.comCasey Banner <kcbanner@gmail.com> 2023-07-13 12:58:42-04:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2023-07-13 22:26:19+02:00
log3ec337484b80647ee23217533c1d62e914afa4f1
tree989450fe99ea16bb7a882ca2a971102b3098151b
parentf2d433a19375734d744656c1c231525aab6ee59f

linker tests: add missing dependOn calls for CheckObject steps


10 files changed, 11 insertions(+), 0 deletions(-)

test/link/macho/dead_strip/build.zig+2
...@@ -16,6 +16,7 @@ pub fn build(b: *std.Build) void {...@@ -16,6 +16,7 @@ pub fn build(b: *std.Build) void {
16 const check = exe.checkObject();16 const check = exe.checkObject();
17 check.checkInSymtab();17 check.checkInSymtab();
18 check.checkNext("{*} (__TEXT,__text) external _iAmUnused");18 check.checkNext("{*} (__TEXT,__text) external _iAmUnused");
19 test_step.dependOn(&check.step);
1920
20 const run = b.addRunArtifact(exe);21 const run = b.addRunArtifact(exe);
21 run.skip_foreign_checks = true;22 run.skip_foreign_checks = true;
...@@ -31,6 +32,7 @@ pub fn build(b: *std.Build) void {...@@ -31,6 +32,7 @@ pub fn build(b: *std.Build) void {
31 const check = exe.checkObject();32 const check = exe.checkObject();
32 check.checkInSymtab();33 check.checkInSymtab();
33 check.checkNotPresent("{*} (__TEXT,__text) external _iAmUnused");34 check.checkNotPresent("{*} (__TEXT,__text) external _iAmUnused");
35 test_step.dependOn(&check.step);
3436
35 const run = b.addRunArtifact(exe);37 const run = b.addRunArtifact(exe);
36 run.skip_foreign_checks = true;38 run.skip_foreign_checks = true;
test/link/macho/dylib/build.zig+1
...@@ -53,6 +53,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize...@@ -53,6 +53,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize
5353
54 check_exe.checkStart("cmd RPATH");54 check_exe.checkStart("cmd RPATH");
55 check_exe.checkNextFileSource("path", dylib.getOutputDirectorySource());55 check_exe.checkNextFileSource("path", dylib.getOutputDirectorySource());
56 test_step.dependOn(&check_exe.step);
5657
57 const run = b.addRunArtifact(exe);58 const run = b.addRunArtifact(exe);
58 run.skip_foreign_checks = true;59 run.skip_foreign_checks = true;
test/link/macho/entry/build.zig+1
...@@ -34,6 +34,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize...@@ -34,6 +34,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize
34 check_exe.checkNext("{n_value} (__TEXT,__text) external _non_main");34 check_exe.checkNext("{n_value} (__TEXT,__text) external _non_main");
3535
36 check_exe.checkComputeCompare("vmaddr entryoff +", .{ .op = .eq, .value = .{ .variable = "n_value" } });36 check_exe.checkComputeCompare("vmaddr entryoff +", .{ .op = .eq, .value = .{ .variable = "n_value" } });
37 test_step.dependOn(&check_exe.step);
3738
38 const run = b.addRunArtifact(exe);39 const run = b.addRunArtifact(exe);
39 run.skip_foreign_checks = true;40 run.skip_foreign_checks = true;
test/link/macho/entry_in_dylib/build.zig+1
...@@ -47,6 +47,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize...@@ -47,6 +47,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize
47 .op = .eq,47 .op = .eq,
48 .value = .{ .variable = "stubs_vmaddr" }, // The entrypoint should be a synthetic stub48 .value = .{ .variable = "stubs_vmaddr" }, // The entrypoint should be a synthetic stub
49 });49 });
50 test_step.dependOn(&check_exe.step);
5051
51 const run = b.addRunArtifact(exe);52 const run = b.addRunArtifact(exe);
52 run.skip_foreign_checks = true;53 run.skip_foreign_checks = true;
test/link/macho/needed_library/build.zig+1
...@@ -41,6 +41,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize...@@ -41,6 +41,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize
41 const check = exe.checkObject();41 const check = exe.checkObject();
42 check.checkStart("cmd LOAD_DYLIB");42 check.checkStart("cmd LOAD_DYLIB");
43 check.checkNext("name @rpath/liba.dylib");43 check.checkNext("name @rpath/liba.dylib");
44 test_step.dependOn(&check.step);
4445
45 const run = b.addRunArtifact(exe);46 const run = b.addRunArtifact(exe);
46 run.skip_foreign_checks = true;47 run.skip_foreign_checks = true;
test/link/macho/search_strategy/build.zig+1
...@@ -23,6 +23,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize...@@ -23,6 +23,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize
23 const check = exe.checkObject();23 const check = exe.checkObject();
24 check.checkStart("cmd LOAD_DYLIB");24 check.checkStart("cmd LOAD_DYLIB");
25 check.checkNext("name @rpath/libsearch_dylibs_first.dylib");25 check.checkNext("name @rpath/libsearch_dylibs_first.dylib");
26 test_step.dependOn(&check.step);
2627
27 const run = b.addRunArtifact(exe);28 const run = b.addRunArtifact(exe);
28 run.skip_foreign_checks = true;29 run.skip_foreign_checks = true;
test/link/macho/stack_size/build.zig+1
...@@ -27,6 +27,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize...@@ -27,6 +27,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize
27 const check_exe = exe.checkObject();27 const check_exe = exe.checkObject();
28 check_exe.checkStart("cmd MAIN");28 check_exe.checkStart("cmd MAIN");
29 check_exe.checkNext("stacksize 100000000");29 check_exe.checkNext("stacksize 100000000");
30 test_step.dependOn(&check_exe.step);
3031
31 const run = b.addRunArtifact(exe);32 const run = b.addRunArtifact(exe);
32 run.skip_foreign_checks = true;33 run.skip_foreign_checks = true;
test/link/macho/strict_validation/build.zig+1
...@@ -121,6 +121,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize...@@ -121,6 +121,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize
121 },121 },
122 else => unreachable,122 else => unreachable,
123 }123 }
124 test_step.dependOn(&check_exe.step);
124125
125 const run = b.addRunArtifact(exe);126 const run = b.addRunArtifact(exe);
126 run.skip_foreign_checks = true;127 run.skip_foreign_checks = true;
test/link/macho/unwind_info/build.zig+1
...@@ -46,6 +46,7 @@ fn testUnwindInfo(...@@ -46,6 +46,7 @@ fn testUnwindInfo(
4646
47 check.checkInSymtab();47 check.checkInSymtab();
48 check.checkNext("{*} (__TEXT,__text) external ___gxx_personality_v0");48 check.checkNext("{*} (__TEXT,__text) external ___gxx_personality_v0");
49 test_step.dependOn(&check.step);
4950
50 const run = b.addRunArtifact(exe);51 const run = b.addRunArtifact(exe);
51 run.skip_foreign_checks = true;52 run.skip_foreign_checks = true;
test/link/macho/weak_library/build.zig+1
...@@ -45,6 +45,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize...@@ -45,6 +45,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize
4545
46 check.checkInSymtab();46 check.checkInSymtab();
47 check.checkNext("(undefined) weak external _asStr (from liba)");47 check.checkNext("(undefined) weak external _asStr (from liba)");
48 test_step.dependOn(&check.step);
4849
49 const run = b.addRunArtifact(exe);50 const run = b.addRunArtifact(exe);
50 run.skip_foreign_checks = true;51 run.skip_foreign_checks = true;