| ... | ... | @@ -25,6 +25,7 @@ pub fn testAll(b: *Build, build_opts: BuildOptions) *Step { |
| 25 | 25 | macho_step.dependOn(testMhExecuteHeader(b, .{ .target = default_target })); |
| 26 | 26 | macho_step.dependOn(testSectionBoundarySymbols(b, .{ .target = default_target })); |
| 27 | 27 | macho_step.dependOn(testSegmentBoundarySymbols(b, .{ .target = default_target })); |
| 28 | macho_step.dependOn(testTentative(b, .{ .target = default_target })); |
| 28 | 29 | macho_step.dependOn(testThunks(b, .{ .target = aarch64_target })); |
| 29 | 30 | macho_step.dependOn(testTlsLargeTbss(b, .{ .target = default_target })); |
| 30 | 31 | macho_step.dependOn(testUndefinedFlag(b, .{ .target = default_target })); |
| ... | ... | @@ -645,6 +646,32 @@ fn testSegmentBoundarySymbols(b: *Build, opts: Options) *Step { |
| 645 | 646 | return test_step; |
| 646 | 647 | } |
| 647 | 648 | |
| 649 | fn testTentative(b: *Build, opts: Options) *Step { |
| 650 | const test_step = addTestStep(b, "macho-tentative", opts); |
| 651 | |
| 652 | const exe = addExecutable(b, opts, .{ .name = "main" }); |
| 653 | addCSourceBytes(exe, |
| 654 | \\int foo; |
| 655 | \\int bar; |
| 656 | \\int baz = 42; |
| 657 | , &.{"-fcommon"}); |
| 658 | addCSourceBytes(exe, |
| 659 | \\#include<stdio.h> |
| 660 | \\int foo; |
| 661 | \\int bar = 5; |
| 662 | \\int baz; |
| 663 | \\int main() { |
| 664 | \\ printf("%d %d %d\n", foo, bar, baz); |
| 665 | \\} |
| 666 | , &.{"-fcommon"}); |
| 667 | |
| 668 | const run = addRunArtifact(exe); |
| 669 | run.expectStdOutEqual("0 5 42\n"); |
| 670 | test_step.dependOn(&run.step); |
| 671 | |
| 672 | return test_step; |
| 673 | } |
| 674 | |
| 648 | 675 | fn testThunks(b: *Build, opts: Options) *Step { |
| 649 | 676 | const test_step = addTestStep(b, "macho-thunks", opts); |
| 650 | 677 | |