forked from cerc-io/laconicd-deprecated
fix build flags for debugging
This commit is contained in:
parent
9de27fb24f
commit
4040c3425f
21
Makefile
21
Makefile
@ -88,23 +88,22 @@ ifeq (boltdb,$(findstring boltdb,$(COSMOS_BUILD_OPTIONS)))
|
|||||||
ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=boltdb
|
ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=boltdb
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)'
|
||||||
|
|
||||||
|
# Check for debug option
|
||||||
|
ifeq (debug,$(findstring debug,$(COSMOS_BUILD_OPTIONS)))
|
||||||
|
BUILD_FLAGS += -gcflags 'all=-N -l'
|
||||||
|
COSMOS_BUILD_OPTIONS += nostrip
|
||||||
|
endif
|
||||||
|
|
||||||
|
# check for nostrip option
|
||||||
ifeq (,$(findstring nostrip,$(COSMOS_BUILD_OPTIONS)))
|
ifeq (,$(findstring nostrip,$(COSMOS_BUILD_OPTIONS)))
|
||||||
|
BUILD_FLAGS += -trimpath
|
||||||
ldflags += -w -s
|
ldflags += -w -s
|
||||||
endif
|
endif
|
||||||
ldflags += $(LDFLAGS)
|
ldflags += $(LDFLAGS)
|
||||||
ldflags := $(strip $(ldflags))
|
ldflags := $(strip $(ldflags))
|
||||||
|
|
||||||
BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)'
|
|
||||||
# check for nostrip option
|
|
||||||
ifeq (,$(findstring nostrip,$(COSMOS_BUILD_OPTIONS)))
|
|
||||||
BUILD_FLAGS += -trimpath
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Check for debug option
|
|
||||||
ifeq (debug,$(findstring debug,$(COSMOS_BUILD_OPTIONS)))
|
|
||||||
BUILD_FLAGS += -gcflags "all=-N -l"
|
|
||||||
endif
|
|
||||||
|
|
||||||
all: tools build lint test
|
all: tools build lint test
|
||||||
# # The below include contains the tools and runsim targets.
|
# # The below include contains the tools and runsim targets.
|
||||||
# include contrib/devtools/Makefile
|
# include contrib/devtools/Makefile
|
||||||
|
Loading…
Reference in New Issue
Block a user