Skip to content

Statically build all releases#1052

Merged
rodaine merged 1 commit intomainfrom
rodaine/static-goreleaser
Jan 12, 2024
Merged

Statically build all releases#1052
rodaine merged 1 commit intomainfrom
rodaine/static-goreleaser

Conversation

@rodaine
Copy link
Member

@rodaine rodaine commented Jan 12, 2024

This patch ensures cgo is disabled when building releases for PGV, making the binaries statically-linked for all targeted linux architectures.

Fixes #1051

Verified locally with goreleaser build:

$ file protoc-gen-validate_linux_amd64_v1/protoc-gen-validate 
protoc-gen-validate: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=tb7sMSnjQh-7-8dwj-lH/T9787ev59A_KyorW6mad/v6PRV3ZwTB6tQWHc6xHc/T7TZq-XGFpsGNognhgR4, stripped

$ file protoc-gen-validate_linux_arm64/protoc-gen-validate
protoc-gen-validate: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=vCwX0aApdg5K4vpifCvn/5E2XJTfVojTMaqafL4ut/QlkXLuZKKxztZHPB5JGZ/Gd0NEotlWEWiD4KPwzjb, stripped

$ file protoc-gen-validate_linux_386/protoc-gen-validate
protoc-gen-validate: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, Go BuildID=iWuJ8rzabo476SePT-ZW/SXAZx5iKhXr-qmQoQQy7/3IJw81PJ0cqeBGfOn8B8/FFRtPeAP0sXRDg17K8TB, stripped

@rodaine rodaine merged commit d61d4ec into main Jan 12, 2024
@rodaine rodaine deleted the rodaine/static-goreleaser branch January 12, 2024 18:56
@danielt998
Copy link

thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use static linking on AMD64

3 participants