From c79ee1fc8d3d44b3c11ca72b0fdb11a158beae63 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 24 Feb 2021 16:36:27 -0700 Subject: [PATCH] build.zig: expose a strip option --- build.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.zig b/build.zig index f53fab73bf..92e03603c5 100644 --- 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);