zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit c79ee1fc8d3d44b3c11ca72b0fdb11a158beae63 (tree)
parent 8e6c2b7a47c3c19269cf03075eaeddb7ee61c42d
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Wed, 24 Feb 2021 16:36:27 -0700

build.zig: expose a strip option

Diffstat:
Mbuild.zig | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/build.zig b/build.zig @@ -77,10 +77,12 @@ pub fn build(b: *Builder) !void { const tracy = b.option([]const u8, "tracy", "Enable Tracy integration. Supply path to Tracy source"); const link_libc = b.option(bool, "force-link-libc", "Force self-hosted compiler to link libc") orelse enable_llvm; + const strip = b.option(bool, "strip", "Omit debug information") orelse false; const main_file = if (is_stage1) "src/stage1.zig" else "src/main.zig"; var exe = b.addExecutable("zig", main_file); + exe.strip = strip; exe.install(); exe.setBuildMode(mode); exe.setTarget(target);