diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -13,9 +13,10 @@ pub const Ctx = struct { test_step: *std.Build.Step, /// A C program to trace, from `targets/`: -O1 with debug info, frame - /// pointers kept, so its code is short and still maps to its source. + /// pointers kept, so its code is short and still maps to its source; no + /// UBSan (Zig's default in Debug), whose checks would be traced too. pub fn cTarget(ctx: Ctx, name: []const u8, files: []const []const u8) *std.Build.Step.Compile { - const mod = ctx.b.createModule(.{ .target = ctx.target, .optimize = .Debug, .link_libc = true, .omit_frame_pointer = false }); + const mod = ctx.b.createModule(.{ .target = ctx.target, .optimize = .Debug, .link_libc = true, .omit_frame_pointer = false, .sanitize_c = .off }); mod.addCSourceFiles(.{ .root = ctx.b.path("targets"), .files = files, .flags = &.{ "-O1", "-g", "-fno-omit-frame-pointer" } }); return ctx.b.addExecutable(.{ .name = name, .root_module = mod }); } |
