diff --git a/build.zig b/build.zig index 6988f03..13ad7c6 100644 --- a/build.zig +++ b/build.zig @@ -2,21 +2,13 @@ const std = @import("std"); const zbs = std.build; pub fn build(b: *zbs.Builder) void { - // Standard target options allows the person running `zig build` to choose - // what target to build for. Here we do not override the defaults, which - // means any target is allowed, and the default is native. Other options - // for restricting supported target set are available. const target = b.standardTargetOptions(.{}); - - // Standard release options allow the person running `zig build` to select - // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. const mode = b.standardReleaseOptions(); const cmph = b.addStaticLibrary("cmph", null); cmph.setTarget(target); cmph.setBuildMode(mode); cmph.linkLibC(); - cmph.force_pic = true; cmph.addCSourceFiles(&.{ "deps/cmph/src/bdz.c", "deps/cmph/src/bdz_ph.c", @@ -44,15 +36,14 @@ pub fn build(b: *zbs.Builder) void { }, &.{ "-W", "-Wno-unused-function", - "-fno-omit-frame-pointer", //"-DDEBUG", }); + cmph.omit_frame_pointer = true; cmph.addIncludeDir("deps/cmph/src"); cmph.addIncludeDir("include/deps/cmph"); { const exe = b.addExecutable("turbo-unix2db", "src/unix2db.zig"); - exe.omit_frame_pointer = false; exe.setTarget(target); exe.setBuildMode(mode); addCmphDeps(exe, cmph);