authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2023-07-26 13:38:24+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2023-07-26 13:38:24+02:00
log780f0b872a964fe4a411a603b733a3d39700ec1c
treefed5f2623483da0d70c952e92c6618194b22b372
parent59284a1085a6ce77c7e582d344ee37c20f85ae9f

link-test: add test case for MachO bug 16308


3 files changed, 28 insertions(+), 0 deletions(-)

test/link.zig+4
......@@ -92,6 +92,10 @@ pub const cases = [_]Case{
9292 .build_root = "test/link/macho/bugs/13457",
9393 .import = @import("link/macho/bugs/13457/build.zig"),
9494 },
95 .{
96 .build_root = "test/link/macho/bugs/16308",
97 .import = @import("link/macho/bugs/16308/build.zig"),
98 },
9599 .{
96100 .build_root = "test/link/macho/dead_strip",
97101 .import = @import("link/macho/dead_strip/build.zig"),
test/link/macho/bugs/16308/build.zig created+23
......@@ -0,0 +1,23 @@
1const std = @import("std");
2
3pub const requires_symlinks = true;
4
5pub fn build(b: *std.Build) void {
6 const test_step = b.step("test", "Test it");
7 b.default_step = test_step;
8
9 const target: std.zig.CrossTarget = .{ .os_tag = .macos };
10
11 const lib = b.addSharedLibrary(.{
12 .name = "a",
13 .root_source_file = .{ .path = "main.zig" },
14 .optimize = .Debug,
15 .target = target,
16 });
17
18 const check = lib.checkObject();
19 check.checkInSymtab();
20 check.checkNotPresent("external");
21
22 test_step.dependOn(&check.step);
23}
test/link/macho/bugs/16308/main.zig created+1
......@@ -0,0 +1 @@
1fn abc() void {}