Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable CGO for improved compatibility across distros #420

Merged
merged 2 commits into from
Oct 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ export PATH := $(shell pwd)/.tmp/protoc/bin:$(PATH)

export PROTOC_VERSION := 22.0

# Disable CGO for improved compatibility across distros
export CGO_ENABLED=0

# TODO: run golint and errcheck, but only to catch *new* violations and
# decide whether to change code or not (e.g. we need to be able to whitelist
# violations already in the code). They can be useful to catch errors, but
Expand Down Expand Up @@ -89,7 +92,8 @@ errcheck:

.PHONY: test
test:
go test -race ./...
# The race detector requires CGO: https://github.com/golang/go/issues/6508
CGO_ENABLED=1 go test -race ./...

.tmp/protoc/bin/protoc: ./Makefile ./download_protoc.sh
./download_protoc.sh
Expand Down