Jakub Konka affd8f8b59 macho: fix incorrect segment/section growth calculation
Otherwise, for last sections in segments it could happen we would
not expand the segment when actually required thus exceeding the
segment's size and causing data clobbering and dyld runtime errors.
2021-09-21 20:22:52 +02:00

17 lines
485 B
Zig

const std = @import("std");
pub fn build(b: *std.build.Builder) !void {
const mode = b.standardReleaseOptions();
const zip_add = b.addTest("main.zig");
zip_add.setBuildMode(mode);
zip_add.addCSourceFile("vendor/kuba-zip/zip.c", &[_][]const u8{
"-std=c99",
"-fno-sanitize=undefined",
});
zip_add.addIncludeDir("vendor/kuba-zip");
zip_add.linkLibC();
const test_step = b.step("test", "Test it");
test_step.dependOn(&zip_add.step);
}