We need to all all=-N -l because some objects are being optimzied away

Without all=-N -l, some objects are being optimized away and
impossible to debug
This commit is contained in:
Hemant Kumar 2022-06-13 14:31:37 -04:00
parent bfe34ab224
commit 86cd654371

View File

@ -809,7 +809,7 @@ kube::golang::build_binaries() {
gogcflags="all=-trimpath=${trimroot} ${GOGCFLAGS:-}"
if [[ "${DBG:-}" == 1 ]]; then
# Debugging - disable optimizations and inlining and trimPath
gogcflags="${GOGCFLAGS:-} -N -l"
gogcflags="${GOGCFLAGS:-} all=-N -l"
goasmflags=""
fi