Skip to content

Commit 0ddb2bd

Browse files
Alessio Tregliatac0turtle
Alessio Treglia
andauthored
Makefile: enable alt dbs conditional compilation (#7396)
Co-authored-by: Marko <marbar3778@yahoo.com>
1 parent fc66cf7 commit 0ddb2bd

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

Makefile

+14
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,23 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=sim \
5959
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \
6060
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)"
6161

62+
# DB backend selection
6263
ifeq (cleveldb,$(findstring cleveldb,$(COSMOS_BUILD_OPTIONS)))
6364
ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=cleveldb
6465
endif
66+
ifeq (badgerdb,$(findstring badgerdb,$(COSMOS_BUILD_OPTIONS)))
67+
ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=badgerdb
68+
endif
69+
# handle rocksdb
70+
ifeq (rocksdb,$(findstring rocksdb,$(TENDERMINT_BUILD_OPTIONS)))
71+
CGO_ENABLED=1
72+
BUILD_TAGS += rocksdb
73+
endif
74+
# handle boltdb
75+
ifeq (boltdb,$(findstring boltdb,$(TENDERMINT_BUILD_OPTIONS)))
76+
BUILD_TAGS += boltdb
77+
endif
78+
6579
ifeq (,$(findstring nostrip,$(COSMOS_BUILD_OPTIONS)))
6680
ldflags += -w -s
6781
endif

go.sum

-2
Original file line numberDiff line numberDiff line change
@@ -581,8 +581,6 @@ github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2l
581581
github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME=
582582
github.com/tendermint/tendermint v0.34.0-rc3 h1:d7Fsd5rdbxq4GmJ0kRfx7l7LesQM7e70f0ytWLTQ/Go=
583583
github.com/tendermint/tendermint v0.34.0-rc3/go.mod h1:BoHcEpjfpBHc1Be7RQz3AHaXFNObcDG7SNHCev6Or4g=
584-
github.com/tendermint/tendermint v0.34.0-rc3.0.20200923104252-a2bbc2984bcc h1:3XcxG8ey0/+lHnyxt/qRkZtGkpWirzYDd67z3W4aS2s=
585-
github.com/tendermint/tendermint v0.34.0-rc3.0.20200923104252-a2bbc2984bcc/go.mod h1:yotsojf2C1QBOw4dZrTcxbyxmPUrT4hNuOQWX9XUwB4=
586584
github.com/tendermint/tendermint v0.34.0-rc4 h1:fnPyDFz9QGAU6tjExoQ8ZY63eHkzdBg5StQgDoeuK0s=
587585
github.com/tendermint/tendermint v0.34.0-rc4/go.mod h1:yotsojf2C1QBOw4dZrTcxbyxmPUrT4hNuOQWX9XUwB4=
588586
github.com/tendermint/tm-db v0.6.1 h1:w3X87itMPXopcRPlFiqspEKhw4FXihPk2rnFFkP0zGk=

0 commit comments

Comments
 (0)