mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 10:05:18 +00:00
update makefile build tags (#1246)
This commit is contained in:
parent
1edb395beb
commit
f472d119cc
38
Makefile
38
Makefile
@ -38,11 +38,13 @@ ifeq ($(LEDGER_ENABLED),true)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(WITH_CLEVELDB),yes)
|
ifeq (cleveldb,$(findstring cleveldb,$(COSMOS_BUILD_OPTIONS)))
|
||||||
build_tags += gcc
|
build_tags += gcc
|
||||||
endif
|
endif
|
||||||
build_tags += $(BUILD_TAGS)
|
|
||||||
build_tags := $(strip $(build_tags))
|
ifeq (secp,$(findstring secp,$(COSMOS_BUILD_OPTIONS)))
|
||||||
|
build_tags += libsecp256k1_sdk
|
||||||
|
endif
|
||||||
|
|
||||||
whitespace :=
|
whitespace :=
|
||||||
whitespace += $(whitespace)
|
whitespace += $(whitespace)
|
||||||
@ -58,14 +60,40 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=kava \
|
|||||||
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" \
|
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" \
|
||||||
-X github.com/tendermint/tendermint/version.TMCoreSemVer=$(TM_PKG_VERSION)
|
-X github.com/tendermint/tendermint/version.TMCoreSemVer=$(TM_PKG_VERSION)
|
||||||
|
|
||||||
ifeq ($(WITH_CLEVELDB),yes)
|
# DB backend selection
|
||||||
|
ifeq (cleveldb,$(findstring cleveldb,$(COSMOS_BUILD_OPTIONS)))
|
||||||
ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=cleveldb
|
ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=cleveldb
|
||||||
endif
|
endif
|
||||||
|
ifeq (badgerdb,$(findstring badgerdb,$(COSMOS_BUILD_OPTIONS)))
|
||||||
|
ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=badgerdb
|
||||||
|
BUILD_TAGS += badgerdb
|
||||||
|
endif
|
||||||
|
# handle rocksdb
|
||||||
|
ifeq (rocksdb,$(findstring rocksdb,$(COSMOS_BUILD_OPTIONS)))
|
||||||
|
CGO_ENABLED=1
|
||||||
|
BUILD_TAGS += rocksdb
|
||||||
|
ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=rocksdb
|
||||||
|
endif
|
||||||
|
# handle boltdb
|
||||||
|
ifeq (boltdb,$(findstring boltdb,$(COSMOS_BUILD_OPTIONS)))
|
||||||
|
BUILD_TAGS += boltdb
|
||||||
|
ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=boltdb
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq (,$(findstring nostrip,$(COSMOS_BUILD_OPTIONS)))
|
||||||
|
ldflags += -w -s
|
||||||
|
endif
|
||||||
ldflags += $(LDFLAGS)
|
ldflags += $(LDFLAGS)
|
||||||
ldflags := $(strip $(ldflags))
|
ldflags := $(strip $(ldflags))
|
||||||
|
|
||||||
BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)'
|
build_tags += $(BUILD_TAGS)
|
||||||
|
build_tags := $(strip $(build_tags))
|
||||||
|
|
||||||
|
BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)'
|
||||||
|
# check for nostrip option
|
||||||
|
ifeq (,$(findstring nostrip,$(COSMOS_BUILD_OPTIONS)))
|
||||||
|
BUILD_FLAGS += -trimpath
|
||||||
|
endif
|
||||||
|
|
||||||
all: install
|
all: install
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user