Skip to content

Commit 8bf17bc

Browse files
authored
Merge pull request #246947 from Homebrew/go-linux-arm-disable-cgo
formulae(go): linux arm disable cgo
2 parents 72c3b07 + f89a37c commit 8bf17bc

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

Formula/c/clive.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class Clive < Formula
1818
depends_on "ttyd"
1919

2020
def install
21+
ENV["CGO_ENABLED"] = "0" if OS.linux? && Hardware::CPU.arm?
22+
2123
system "go", "build", *std_go_args(ldflags: "-s -w -X github.com/koki-develop/clive/cmd.version=v#{version}")
2224
end
2325

Formula/g/gat.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class Gat < Formula
1717
depends_on "go" => :build
1818

1919
def install
20+
ENV["CGO_ENABLED"] = "0" if OS.linux? && Hardware::CPU.arm?
21+
2022
system "go", "build", *std_go_args(ldflags: "-s -w -X github.com/koki-develop/gat/cmd.version=v#{version}")
2123
end
2224

Formula/s/sttr.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class Sttr < Formula
1717
depends_on "go" => :build
1818

1919
def install
20+
ENV["CGO_ENABLED"] = "0" if OS.linux? && Hardware::CPU.arm?
21+
2022
system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}")
2123
end
2224

Formula/s/symfony-cli.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class SymfonyCli < Formula
1717
depends_on "composer" => :test
1818

1919
def install
20+
ENV["CGO_ENABLED"] = "0" if OS.linux? && Hardware::CPU.arm?
21+
2022
system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version} -X main.channel=stable", output: bin/"symfony")
2123
end
2224

Formula/t/tile38.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ def datadir
2222
end
2323

2424
def install
25+
ENV["CGO_ENABLED"] = "0" if OS.linux? && Hardware::CPU.arm?
26+
2527
ldflags = %W[
2628
-s -w
2729
-X github.com/tidwall/tile38/core.Version=#{version}

0 commit comments

Comments
 (0)