mirror of
https://github.com/grafana/grafana.git
synced 2026-07-03 03:37:53 +00:00
make: build-go: add trimpath for non-dev, and debug-friendly flags for dev (#120264)
This commit is contained in:
parent
264fd28b64
commit
30777ae15a
2 changed files with 2 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
|||
[build]
|
||||
bin = "./bin/grafana-air"
|
||||
args_bin = ["server", "-profile", "-profile-addr=127.0.0.1", "-profile-port=6000", "-profile-block-rate=1", "-profile-mutex-rate=5", "-packaging=dev", "cfg:app_mode=development"]
|
||||
cmd = "make CGO_ENABLED=0 GO_BUILD_GCFLAGS='all=-N -l' SOURCE_DATE_EPOCH=1767222000 GO_BUILD_DEV=1 build-air"
|
||||
cmd = "make CGO_ENABLED=0 SOURCE_DATE_EPOCH=1767222000 GO_BUILD_DEV=1 build-air"
|
||||
exclude_regex = ["_test.go", "_gen.go"]
|
||||
exclude_unchanged = true
|
||||
follow_symlink = true
|
||||
|
|
|
|||
2
Makefile
2
Makefile
|
|
@ -287,7 +287,7 @@ update-workspace: gen-go
|
|||
.PHONY: build-go
|
||||
build-go: gen-themes ## Build all Go binaries (grafana, grafana-server, grafana-cli).
|
||||
@echo "build go binaries"
|
||||
$(if $(CGO_ENABLED),CGO_ENABLED=$(CGO_ENABLED)) $(if $(GO_BUILD_OS),GOOS=$(GO_BUILD_OS)) $(if $(GO_BUILD_ARCH),GOARCH=$(GO_BUILD_ARCH)) $(GO) build -buildvcs=false -trimpath $(GO_RACE_FLAG) $(if $(GO_BUILD_TAGS),-tags $(GO_BUILD_TAGS)) $(if $(GO_BUILD_GCFLAGS),-gcflags "$(GO_BUILD_GCFLAGS)") -ldflags "$(GO_LDFLAGS)" -o ./bin/grafana ./pkg/cmd/grafana
|
||||
$(if $(CGO_ENABLED),CGO_ENABLED=$(CGO_ENABLED)) $(if $(GO_BUILD_OS),GOOS=$(GO_BUILD_OS)) $(if $(GO_BUILD_ARCH),GOARCH=$(GO_BUILD_ARCH)) $(GO) build -buildvcs=false $(if $(GO_BUILD_DEV),-gcflags "all=-N -l",-trimpath) $(GO_RACE_FLAG) $(if $(GO_BUILD_TAGS),-tags $(GO_BUILD_TAGS)) $(if $(GO_BUILD_GCFLAGS),-gcflags "$(GO_BUILD_GCFLAGS)") -ldflags "$(GO_LDFLAGS)" -o ./bin/grafana ./pkg/cmd/grafana
|
||||
|
||||
.PHONY: build-backend
|
||||
build-backend: build-go
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue