diff --git a/Makefile b/Makefile index ad9d7f7..a311438 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ ZIG ?= zig PREFIX ?= /usr/local BINDIR ?= ${PREFIX}/bin MANDIR ?= ${PREFIX}/share/man/man1 -ZIG_FLAGS ?= --release=fast +ZIG_FLAGS ?= --release=fast -Dstrip NCDU_VERSION=$(shell grep 'program_version = "' src/main.zig | sed -e 's/^.*"\(.\+\)".*$$/\1/') diff --git a/build.zig b/build.zig index fd1c6c1..2b7f5a9 100644 --- a/build.zig +++ b/build.zig @@ -8,12 +8,14 @@ pub fn build(b: *std.Build) void { const optimize = b.standardOptimizeOption(.{}); const pie = b.option(bool, "pie", "Build with PIE support (by default false)") orelse false; + const strip = b.option(bool, "strip", "Strip debugging info (by default false)") orelse false; const exe = b.addExecutable(.{ .name = "ncdu", .root_source_file = b.path("src/main.zig"), .target = target, .optimize = optimize, + .strip = strip, .link_libc = true, });