File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,19 @@ ifeq ($(shell ldconfig -p | grep -q libhlml.so && echo exists),exists)
47
47
GPU_TAGS := habana
48
48
endif
49
49
50
+ # Use PRODUCTION to enable/disable stripping binaries for the kepler exporter
51
+ # and validator. That reduces the size of the binaries and removes debug symbols.
52
+ # Expected values for this flag are:
53
+ # 0 - Unstripped binaries including debug symbols (default);
54
+ # 1 - Stripped binaries.
55
+ # More about stripped binaries and debug symbols can be found at the RedHat's developer portal here:
56
+ # * https://developers.redhat.com/articles/2024/04/03/how-add-debug-support-go-stripped-binaries
57
+ #
58
+ PRODUCTION ?= 0
59
+ ifeq ($(PRODUCTION ) ,1)
60
+ LDFLAGS+ = -s -w
61
+ endif
62
+
50
63
# set GOENV
51
64
GOOS := $(shell go env GOOS)
52
65
GOARCH := $(shell go env GOARCH)
You can’t perform that action at this time.
0 commit comments