Disable CGO for improved compatibility across distros (#420)
* Disable CGO for improved compatibility across distros * Enabled CGO in tests for the race detector
This commit is contained in:
parent
bc2944de97
commit
28c0ee28f0
6
Makefile
6
Makefile
|
|
@ -4,6 +4,9 @@ export PATH := $(shell pwd)/.tmp/protoc/bin:$(PATH)
|
||||||
|
|
||||||
export PROTOC_VERSION := 22.0
|
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
|
# 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
|
# 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
|
# violations already in the code). They can be useful to catch errors, but
|
||||||
|
|
@ -89,7 +92,8 @@ errcheck:
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
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
|
.tmp/protoc/bin/protoc: ./Makefile ./download_protoc.sh
|
||||||
./download_protoc.sh
|
./download_protoc.sh
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue