mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-18 21:35:24 +01:00
make: don't optimize debug binaries
Disable compiler optimizations and function inlining on a debug build to improve debugging experience.
This commit is contained in:
parent
088970e7e8
commit
abada24899
5
Makefile
5
Makefile
@ -53,6 +53,7 @@ make_ldflags = $(2) -X $(PKG)/build.Commit=$(COMMIT) \
|
||||
-X $(PKG)/build.GoVersion=$(GOVERSION) \
|
||||
-X $(PKG)/build.RawTags=$(shell echo $(1) | sed -e 's/ /,/g')
|
||||
|
||||
DEV_GCFLAGS := -gcflags "all=-N -l"
|
||||
LDFLAGS := -ldflags "$(call make_ldflags, ${tags}, -s -w)"
|
||||
DEV_LDFLAGS := -ldflags "$(call make_ldflags, $(DEV_TAGS))"
|
||||
ITEST_LDFLAGS := -ldflags "$(call make_ldflags, $(ITEST_TAGS))"
|
||||
@ -116,8 +117,8 @@ $(GOFUZZ_DEP_BIN):
|
||||
|
||||
build:
|
||||
@$(call print, "Building debug lnd and lncli.")
|
||||
$(GOBUILD) -tags="$(DEV_TAGS)" -o lnd-debug $(DEV_LDFLAGS) $(PKG)/cmd/lnd
|
||||
$(GOBUILD) -tags="$(DEV_TAGS)" -o lncli-debug $(DEV_LDFLAGS) $(PKG)/cmd/lncli
|
||||
$(GOBUILD) -tags="$(DEV_TAGS)" -o lnd-debug $(DEV_GCFLAGS) $(DEV_LDFLAGS) $(PKG)/cmd/lnd
|
||||
$(GOBUILD) -tags="$(DEV_TAGS)" -o lncli-debug $(DEV_GCFLAGS) $(DEV_LDFLAGS) $(PKG)/cmd/lncli
|
||||
|
||||
build-itest:
|
||||
@$(call print, "Building itest btcd and lnd.")
|
||||
|
Loading…
Reference in New Issue
Block a user