create(go): add -s -w ldflags to reduce the artifact size

Signed-off-by: Rui Chen <rui@chenrui.dev>
This commit is contained in:
Rui Chen 2021-08-22 14:30:26 -04:00
parent d14fc2db12
commit 4474818d07

View File

@ -166,7 +166,7 @@ module Homebrew
system "shards", "build", "--release"
bin.install "bin/#{name}"
<% elsif mode == :go %>
system "go", "build", *std_go_args
system "go", "build", *std_go_args(ldflags: "-s -w")
<% elsif mode == :meson %>
mkdir "build" do
system "meson", *std_meson_args, ".."