| ... | @@ -25,6 +25,7 @@ pub fn testAll(b: *Build, build_opts: BuildOptions) *Step { | ... | @@ -25,6 +25,7 @@ pub fn testAll(b: *Build, build_opts: BuildOptions) *Step { |
| 25 | macho_step.dependOn(testMhExecuteHeader(b, .{ .target = default_target })); | 25 | macho_step.dependOn(testMhExecuteHeader(b, .{ .target = default_target })); |
| 26 | macho_step.dependOn(testSectionBoundarySymbols(b, .{ .target = default_target })); | 26 | macho_step.dependOn(testSectionBoundarySymbols(b, .{ .target = default_target })); |
| 27 | macho_step.dependOn(testSegmentBoundarySymbols(b, .{ .target = default_target })); | 27 | macho_step.dependOn(testSegmentBoundarySymbols(b, .{ .target = default_target })); |
| | 28 | macho_step.dependOn(testTentative(b, .{ .target = default_target })); |
| 28 | macho_step.dependOn(testThunks(b, .{ .target = aarch64_target })); | 29 | macho_step.dependOn(testThunks(b, .{ .target = aarch64_target })); |
| 29 | macho_step.dependOn(testTlsLargeTbss(b, .{ .target = default_target })); | 30 | macho_step.dependOn(testTlsLargeTbss(b, .{ .target = default_target })); |
| 30 | macho_step.dependOn(testUndefinedFlag(b, .{ .target = default_target })); | 31 | macho_step.dependOn(testUndefinedFlag(b, .{ .target = default_target })); |
| ... | @@ -645,6 +646,32 @@ fn testSegmentBoundarySymbols(b: *Build, opts: Options) *Step { | ... | @@ -645,6 +646,32 @@ fn testSegmentBoundarySymbols(b: *Build, opts: Options) *Step { |
| 645 | return test_step; | 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 | fn testThunks(b: *Build, opts: Options) *Step { | 675 | fn testThunks(b: *Build, opts: Options) *Step { |
| 649 | const test_step = addTestStep(b, "macho-thunks", opts); | 676 | const test_step = addTestStep(b, "macho-thunks", opts); |
| 650 | | 677 | |