mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-12 17:08:39 -09:00
build: Expose -Dstrip flag
Compiling with -fstrip generates *much* smaller binaries, even compared to running 'strip' after a regular build.
This commit is contained in:
parent
5593fa2233
commit
e5a6a1c5ea
2 changed files with 3 additions and 1 deletions
2
Makefile
2
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/')
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue