mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
link-test: add test case for MachO bug 16308
This commit is contained in:
parent
59284a1085
commit
780f0b872a
@ -92,6 +92,10 @@ pub const cases = [_]Case{
|
||||
.build_root = "test/link/macho/bugs/13457",
|
||||
.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"),
|
||||
|
||||
23
test/link/macho/bugs/16308/build.zig
Normal file
23
test/link/macho/bugs/16308/build.zig
Normal file
@ -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);
|
||||
}
|
||||
1
test/link/macho/bugs/16308/main.zig
Normal file
1
test/link/macho/bugs/16308/main.zig
Normal file
@ -0,0 +1 @@
|
||||
fn abc() void {}
|
||||
Loading…
x
Reference in New Issue
Block a user