diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2023-07-26 18:22:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-26 18:22:43 +0200 |
| commit | cb475aa161238ef0d77fc49b13c23f2c4b48bfc5 (patch) | |
| tree | 7068693650ad4cb2da4abcd9818aa55b2f9d69e8 /test | |
| parent | 584b062a302ca10ecab4488a473440db7173bb2a (diff) | |
| parent | 780f0b872a964fe4a411a603b733a3d39700ec1c (diff) | |
| download | zig-cb475aa161238ef0d77fc49b13c23f2c4b48bfc5.tar.gz zig-cb475aa161238ef0d77fc49b13c23f2c4b48bfc5.zip | |
Merge pull request #16563 from ziglang/issues-16308
macho: create export trie root explicitly with Trie.init rather than implicitly on first Trie.put
Diffstat (limited to 'test')
| -rw-r--r-- | test/link.zig | 4 | ||||
| -rw-r--r-- | test/link/macho/bugs/16308/build.zig | 23 | ||||
| -rw-r--r-- | test/link/macho/bugs/16308/main.zig | 1 |
3 files changed, 28 insertions, 0 deletions
diff --git a/test/link.zig b/test/link.zig index ac0bcf3df8..c877e6c357 100644 --- a/test/link.zig +++ b/test/link.zig @@ -93,6 +93,10 @@ pub const cases = [_]Case{ .import = @import("link/macho/bugs/13457/build.zig"), }, .{ + .build_root = "test/link/macho/bugs/16308", + .import = @import("link/macho/bugs/16308/build.zig"), + }, + .{ .build_root = "test/link/macho/dead_strip", .import = @import("link/macho/dead_strip/build.zig"), }, diff --git a/test/link/macho/bugs/16308/build.zig b/test/link/macho/bugs/16308/build.zig new file mode 100644 index 0000000000..a6329074a0 --- /dev/null +++ b/test/link/macho/bugs/16308/build.zig @@ -0,0 +1,23 @@ +const std = @import("std"); + +pub const requires_symlinks = true; + +pub fn build(b: *std.Build) void { + const test_step = b.step("test", "Test it"); + b.default_step = test_step; + + const target: std.zig.CrossTarget = .{ .os_tag = .macos }; + + const lib = b.addSharedLibrary(.{ + .name = "a", + .root_source_file = .{ .path = "main.zig" }, + .optimize = .Debug, + .target = target, + }); + + const check = lib.checkObject(); + check.checkInSymtab(); + check.checkNotPresent("external"); + + test_step.dependOn(&check.step); +} diff --git a/test/link/macho/bugs/16308/main.zig b/test/link/macho/bugs/16308/main.zig new file mode 100644 index 0000000000..fd94789461 --- /dev/null +++ b/test/link/macho/bugs/16308/main.zig @@ -0,0 +1 @@ +fn abc() void {} |
