Skip to content

Commit 945b0d5

Browse files
authored
Merge pull request #247077 from Homebrew/go-linux-arm
formulae(go): linux arm disable cgo
2 parents 1b15383 + a2cef01 commit 945b0d5

File tree

7 files changed

+16
-1
lines changed

7 files changed

+16
-1
lines changed

Formula/c/csprecon.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class Csprecon < 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"), "./cmd/csprecon"
2123
end
2224

Formula/i/infisical.rb

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

1919
def install
20+
ENV["CGO_ENABLED"] = "0" if OS.linux? && Hardware::CPU.arm?
21+
2022
ldflags = %W[
2123
-s -w
2224
-X github.com/Infisical/infisical-merge/packages/util.CLI_VERSION=#{version}

Formula/m/multi-gitter.rb

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

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

Formula/p/pulumi.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ class Pulumi < Formula
2020
depends_on "go" => :build
2121

2222
def install
23+
ENV["CGO_ENABLED"] = "0" if OS.linux? && Hardware::CPU.arm?
24+
2325
cd "./sdk" do
2426
system "go", "mod", "download"
2527
end
28+
2629
cd "./pkg" do
2730
system "go", "mod", "download"
2831
end

Formula/t/terragrunt.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ class Terragrunt < Formula
2727
conflicts_with "tgenv", because: "tgenv symlinks terragrunt binaries"
2828

2929
def install
30+
ENV["CGO_ENABLED"] = "0" if OS.linux? && Hardware::CPU.arm?
31+
3032
ldflags = %W[
3133
-s -w
3234
-X github.com/gruntwork-io/go-commons/version.Version=#{version}

Formula/y/yutu.rb

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

1919
def install
20+
ENV["CGO_ENABLED"] = "0" if OS.linux? && Hardware::CPU.arm?
21+
2022
mod = "github.com/eat-pray-ai/yutu/cmd"
2123
ldflags = %W[
2224
-s -w

Formula/z/zrok.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Zrok < Formula
77
license all_of: ["Apache-2.0", "BSD-3-Clause", "MIT"]
88
head "https://github.com/openziti/zrok.git", branch: "main"
99

10-
no_autobump! because: :requires_manual_review
10+
no_autobump! because: :bumped_by_upstream
1111

1212
bottle do
1313
sha256 cellar: :any_skip_relocation, arm64_tahoe: "69512d5888b0ab4f9a81010b546c4d1e7b48b52be839c8ff1cdd904a9bb1d7c1"
@@ -28,6 +28,8 @@ def install
2828
end
2929
end
3030

31+
ENV["CGO_ENABLED"] = "0" if OS.linux? && Hardware::CPU.arm?
32+
3133
ldflags = %W[
3234
-s -w
3335
-X github.com/openziti/zrok/build.Version=v#{version}

0 commit comments

Comments
 (0)