From 1d128c1289b781b4212296e2143de5b9f2009cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Mon, 4 Jul 2022 14:31:15 +0300 Subject: [PATCH] back to omit-frame-pointer --- build.zig | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) 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);