From 8a1b48046d80df7cf5e89908c05ac4eb5e2bde19 Mon Sep 17 00:00:00 2001 From: Brian Pursley Date: Tue, 1 Nov 2022 13:23:16 -0400 Subject: [PATCH] Allow DBG=1 to be used with make release-images and make quick-release-images --- build/release-images.sh | 2 +- build/root/Makefile | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/build/release-images.sh b/build/release-images.sh index c9182f4a2ca3e..afaecb1864bb5 100755 --- a/build/release-images.sh +++ b/build/release-images.sh @@ -37,7 +37,7 @@ fi kube::build::verify_prereqs kube::build::build_image -kube::build::run_build_command make all WHAT="${CMD_TARGETS}" KUBE_BUILD_PLATFORMS="${KUBE_SERVER_PLATFORMS[*]}" +kube::build::run_build_command make all WHAT="${CMD_TARGETS}" KUBE_BUILD_PLATFORMS="${KUBE_SERVER_PLATFORMS[*]}" DBG="${DBG:-}" kube::build::copy_output diff --git a/build/root/Makefile b/build/root/Makefile index d7148c26066bf..81cc3aa1528c4 100644 --- a/build/root/Makefile +++ b/build/root/Makefile @@ -361,9 +361,14 @@ define RELEASE_IMAGES_HELP_INFO # # Args: # KUBE_BUILD_CONFORMANCE: Whether to build conformance testing image as well. Set to 'n' to skip. +# DBG: If set to "1", build with optimizations disabled for easier debugging. Any other value is ignored. # # Example: # make release-images +# make release-images DBG=1 +# Note: Specify DBG=1 for building unstripped binaries, which allows you to use code debugging +# tools like delve. When DBG is unspecified, it defaults to "-s -w" which strips debug +# information. endef .PHONY: release-images ifeq ($(PRINT_HELP),y) @@ -405,9 +410,14 @@ define QUICK_RELEASE_IMAGES_HELP_INFO # Args: # KUBE_FASTBUILD: Whether to cross-compile for other architectures. Set to 'false' to do so. # KUBE_BUILD_CONFORMANCE: Whether to build conformance testing image as well. Set to 'y' to do so. +# DBG: If set to "1", build with optimizations disabled for easier debugging. Any other value is ignored. # # Example: # make quick-release-images +# make quick-release-images DBG=1 +# Note: Specify DBG=1 for building unstripped binaries, which allows you to use code debugging +# tools like delve. When DBG is unspecified, it defaults to "-s -w" which strips debug +# information. endef .PHONY: quick-release-images ifeq ($(PRINT_HELP),y)