authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-02-24 16:36:27-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-02-24 16:36:27-07:00
logc79ee1fc8d3d44b3c11ca72b0fdb11a158beae63
treeac68e6010ff36df84bc231d3ced291b988ee82b9
parent8e6c2b7a47c3c19269cf03075eaeddb7ee61c42d

build.zig: expose a strip option


1 files changed, 2 insertions(+), 0 deletions(-)

build.zig+2
...@@ -77,10 +77,12 @@ pub fn build(b: *Builder) !void {...@@ -77,10 +77,12 @@ pub fn build(b: *Builder) !void {
7777
78 const tracy = b.option([]const u8, "tracy", "Enable Tracy integration. Supply path to Tracy source");78 const tracy = b.option([]const u8, "tracy", "Enable Tracy integration. Supply path to Tracy source");
79 const link_libc = b.option(bool, "force-link-libc", "Force self-hosted compiler to link libc") orelse enable_llvm;79 const link_libc = b.option(bool, "force-link-libc", "Force self-hosted compiler to link libc") orelse enable_llvm;
80 const strip = b.option(bool, "strip", "Omit debug information") orelse false;
8081
81 const main_file = if (is_stage1) "src/stage1.zig" else "src/main.zig";82 const main_file = if (is_stage1) "src/stage1.zig" else "src/main.zig";
8283
83 var exe = b.addExecutable("zig", main_file);84 var exe = b.addExecutable("zig", main_file);
85 exe.strip = strip;
84 exe.install();86 exe.install();
85 exe.setBuildMode(mode);87 exe.setBuildMode(mode);
86 exe.setTarget(target);88 exe.setTarget(target);