From fda5589f20d4f59ba09e4f1d25f9c9adb075bbef Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Wed, 30 Jun 2021 15:14:36 -0700 Subject: [PATCH] fix stripping, update readme for proper sizing --- README.md | 6 ++++-- build.zig | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7f462ae..c6c4293 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,10 @@ This is my first serious zig effort, so please issue a PR if the code isn't This is designed to be built statically using the `aws_c_*` libraries, so we inherit a lot of the goodness of the work going on there. Current -executable size is 10.3M, about half of which is due to the SSL library. -This is for x86_linux (which is all that's tested at the moment). +executable size is 9.7M, about half of which is due to the SSL library. +Running strip on the executable after compilation (it seems zig strip +only goes so far), reduces this to 4.3M. This is for x86_linux, +(which is all that's tested at the moment). ## Building diff --git a/build.zig b/build.zig index 916989e..a634b23 100644 --- a/build.zig +++ b/build.zig @@ -55,7 +55,7 @@ pub fn build(b: *Builder) !void { exe.linkage = .static; const is_strip = b.option(bool, "strip", "strip exe") orelse true; - exe.strip = !is_strip; + exe.strip = is_strip; const run_cmd = exe.run(); run_cmd.step.dependOn(b.getInstallStep());