Skip to content

Commit f9c166a

Browse files
authored
feat(evmd): Enable RocksDB backend compilation for evmd (#747)
* support rocksdb build options in localnode script compilation * echo provided build flags before building
1 parent 79089fe commit f9c166a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ build_tags = netgo
4343
ifeq (cleveldb,$(findstring cleveldb,$(COSMOS_BUILD_OPTIONS)))
4444
build_tags += gcc
4545
endif
46+
ifeq (rocksdb,$(findstring rocksdb,$(COSMOS_BUILD_OPTIONS)))
47+
build_tags += gcc
48+
build_tags += rocksdb
49+
endif
4650
build_tags += $(BUILD_TAGS)
4751
build_tags := $(strip $(build_tags))
4852

@@ -58,6 +62,9 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=os \
5862
ifeq (cleveldb,$(findstring cleveldb,$(COSMOS_BUILD_OPTIONS)))
5963
ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=cleveldb
6064
endif
65+
ifeq (rocksdb,$(findstring rocksdb,$(COSMOS_BUILD_OPTIONS)))
66+
ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=rocksdb
67+
endif
6168

6269
# add build tags to linker flags
6370
whitespace := $(subst ,, )
@@ -90,6 +97,7 @@ endif
9097
# Build into $(BUILDDIR)
9198
build: go.sum $(BUILDDIR)/
9299
@echo "🏗️ Building evmd to $(BUILDDIR)/$(EXAMPLE_BINARY) ..."
100+
@echo "BUILD_FLAGS: $(BUILD_FLAGS)"
93101
@cd $(EVMD_DIR) && CGO_ENABLED="1" \
94102
go build $(BUILD_FLAGS) -o $(BUILDDIR)/$(EXAMPLE_BINARY) $(EVMD_MAIN_PKG)
95103

@@ -100,6 +108,7 @@ build-linux:
100108
# Install into $(BINDIR)
101109
install: go.sum
102110
@echo "🚚 Installing evmd to $(BINDIR) ..."
111+
@echo "BUILD_FLAGS: $(BUILD_FLAGS)"
103112
@cd $(EVMD_DIR) && CGO_ENABLED="1" \
104113
go install $(BUILD_FLAGS) $(EVMD_MAIN_PKG)
105114

0 commit comments

Comments
 (0)