diff --git a/Makefile b/Makefile index efc87c514..a6eafd75c 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ codis-dashboard: codis-deps @./bin/codis-dashboard --default-config > config/dashboard.toml codis-proxy: codis-deps - go build -i -o bin/codis-proxy ./cmd/proxy + go build -i -tags "cgo_jemalloc" -o bin/codis-proxy ./cmd/proxy @./bin/codis-proxy --default-config > config/proxy.toml codis-admin: codis-deps diff --git a/pkg/utils/unsafe2/cgo_malloc.go b/pkg/utils/unsafe2/cgo_malloc.go index 6f395fc5e..101b9bc8c 100644 --- a/pkg/utils/unsafe2/cgo_malloc.go +++ b/pkg/utils/unsafe2/cgo_malloc.go @@ -1,7 +1,7 @@ // Copyright 2016 CodisLabs. All Rights Reserved. // Licensed under the MIT (MIT-LICENSE.txt) license. -// +build !darwin,!linux +// +build !cgo_jemalloc package unsafe2 diff --git a/pkg/utils/unsafe2/je_malloc.go b/pkg/utils/unsafe2/je_malloc.go index 13ad747ff..74f6dee4e 100644 --- a/pkg/utils/unsafe2/je_malloc.go +++ b/pkg/utils/unsafe2/je_malloc.go @@ -1,7 +1,7 @@ // Copyright 2016 CodisLabs. All Rights Reserved. // Licensed under the MIT (MIT-LICENSE.txt) license. -// +build darwin linux +// +build cgo_jemalloc package unsafe2