Skip to content

Commit

Permalink
fix: select goleveldb when options libsecp256k1 only
Browse files Browse the repository at this point in the history
When LBM_BUILD_OPTIONS has no DB options and only has libsecp256k1, goleveldb will be selected by default.
The previous commit has a bug for that.
  • Loading branch information
Yongwoo Lee committed May 13, 2021
1 parent 86eea35 commit 8a27f51
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ ifeq ($(LEDGER_ENABLED),true)
endif
endif

# DB backend and secp256k1 implementation selection
ifeq (,$(filter $(LBM_BUILD_OPTIONS), cleveldb rocksdb boltdb badgerdb libsecp256k1))
# DB backend selection
ifeq (,$(filter $(LBM_BUILD_OPTIONS), cleveldb rocksdb boltdb badgerdb))
BUILD_TAGS += goleveldb
DB_BACKEND = goleveldb
else
Expand All @@ -64,10 +64,12 @@ else
BUILD_TAGS += boltdb
DB_BACKEND = boltdb
endif
ifeq (libsecp256k1,$(findstring libsecp256k1,$(LBM_BUILD_OPTIONS)))
CGO_ENABLED=1
BUILD_TAGS += libsecp256k1
endif
endif

# secp256k1 implementation selection
ifeq (libsecp256k1,$(findstring libsecp256k1,$(LBM_BUILD_OPTIONS)))
CGO_ENABLED=1
BUILD_TAGS += libsecp256k1
endif

build_tags += $(BUILD_TAGS)
Expand Down

0 comments on commit 8a27f51

Please sign in to comment.