Skip to content

Commit

Permalink
Disable cgo when building the probe
Browse files Browse the repository at this point in the history
With newer versions of Go the way the default setting
for cgo_enabled changed and it results in it being enabled.
cgo links the libc which is not practical for deployment on
other system/containers. This commit enforce disabling
of cgo as it was the case in previous build before bumping
Go's version.
  • Loading branch information
geobeau committed Jan 7, 2025
1 parent 7efd3e3 commit 61fb0be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ test:
go test ./...

build:
go build -o build/aerospike_probe probes/aerospike/main.go
CGO_ENABLED=0 go build -o build/aerospike_probe probes/aerospike/main.go

build_linux:
GOOS=linux GOARCH=amd64 go build -o build/aerospike_probe probes/aerospike/*.go
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/aerospike_probe probes/aerospike/*.go

lint:
gofmt -d -e -s pkg/**/*.go probes/**/*.go
Expand Down

0 comments on commit 61fb0be

Please sign in to comment.