mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-07 00:26:58 +00:00
libs/db: conditional compilation
For cleveldb: go build -tags cleveldb For boltdb: go build -tags boltdb Fixes #3611
This commit is contained in:
@@ -23,7 +23,7 @@ build:
|
||||
CGO_ENABLED=0 go build $(BUILD_FLAGS) -tags $(BUILD_TAGS) -o $(OUTPUT) ./cmd/tendermint/
|
||||
|
||||
build_c:
|
||||
CGO_ENABLED=1 go build $(BUILD_FLAGS) -tags "$(BUILD_TAGS) gcc" -o $(OUTPUT) ./cmd/tendermint/
|
||||
CGO_ENABLED=1 go build $(BUILD_FLAGS) -tags "$(BUILD_TAGS) cleveldb" -o $(OUTPUT) ./cmd/tendermint/
|
||||
|
||||
build_race:
|
||||
CGO_ENABLED=0 go build -race $(BUILD_FLAGS) -tags $(BUILD_TAGS) -o $(OUTPUT) ./cmd/tendermint
|
||||
@@ -32,7 +32,7 @@ install:
|
||||
CGO_ENABLED=0 go install $(BUILD_FLAGS) -tags $(BUILD_TAGS) ./cmd/tendermint
|
||||
|
||||
install_c:
|
||||
CGO_ENABLED=1 go install $(BUILD_FLAGS) -tags "$(BUILD_TAGS) gcc" ./cmd/tendermint
|
||||
CGO_ENABLED=1 go install $(BUILD_FLAGS) -tags "$(BUILD_TAGS) cleveldb" ./cmd/tendermint
|
||||
|
||||
########################################
|
||||
### Protobuf
|
||||
@@ -132,7 +132,7 @@ clean_certs:
|
||||
rm -f db/remotedb/::.crt db/remotedb/::.key
|
||||
|
||||
test_libs: gen_certs
|
||||
go test -tags gcc $(PACKAGES)
|
||||
go test -tags clevedb boltdb $(PACKAGES)
|
||||
make clean_certs
|
||||
|
||||
grpc_dbserver:
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// +build boltdb
|
||||
package db
|
||||
|
||||
import (
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// +build boltdb
|
||||
package db
|
||||
|
||||
import (
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// +build gcc
|
||||
|
||||
// +build cleveldb
|
||||
package db
|
||||
|
||||
import (
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// +build gcc
|
||||
|
||||
// +build cleveldb
|
||||
package db
|
||||
|
||||
import (
|
||||
|
||||
Reference in New Issue
Block a user