Merge pull request #11902 from chenrui333/improve-go-formulae-creation

create(go): add `-s -w` ldflags to reduce the artifact size
This commit is contained in:
Carlo Cabrera 2021-08-30 23:37:41 +08:00 committed by GitHub
commit 3947d09e50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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, ".."