mirror of
https://github.com/ziglang/zig.git
synced 2026-01-30 11:13:38 +00:00
macho: add linker test case for issue 13457
This commit is contained in:
parent
d02242661e
commit
aaaa7df152
@ -74,6 +74,10 @@ fn addWasmCases(cases: *tests.StandaloneContext) void {
|
||||
}
|
||||
|
||||
fn addMachOCases(cases: *tests.StandaloneContext) void {
|
||||
cases.addBuildFile("test/link/macho/bugs/13457/build.zig", .{
|
||||
.build_modes = true,
|
||||
});
|
||||
|
||||
cases.addBuildFile("test/link/macho/dead_strip/build.zig", .{
|
||||
.build_modes = false,
|
||||
});
|
||||
|
||||
17
test/link/macho/bugs/13457/build.zig
Normal file
17
test/link/macho/bugs/13457/build.zig
Normal file
@ -0,0 +1,17 @@
|
||||
const std = @import("std");
|
||||
const Builder = std.build.Builder;
|
||||
const LibExeObjectStep = std.build.LibExeObjStep;
|
||||
|
||||
pub fn build(b: *Builder) void {
|
||||
const mode = b.standardReleaseOptions();
|
||||
const target: std.zig.CrossTarget = .{ .os_tag = .macos };
|
||||
|
||||
const test_step = b.step("test", "Test the program");
|
||||
|
||||
const exe = b.addExecutable("test", "main.zig");
|
||||
exe.setBuildMode(mode);
|
||||
exe.setTarget(target);
|
||||
|
||||
const run = exe.runEmulatable();
|
||||
test_step.dependOn(&run.step);
|
||||
}
|
||||
1
test/link/macho/bugs/13457/main.zig
Normal file
1
test/link/macho/bugs/13457/main.zig
Normal file
@ -0,0 +1 @@
|
||||
pub fn main() void {}
|
||||
Loading…
x
Reference in New Issue
Block a user