From c33ebe97cc2548f0aab4f420ad1c3af0e0e73344 Mon Sep 17 00:00:00 2001 From: hc-github-team-secure-vault-core <82990506+hc-github-team-secure-vault-core@users.noreply.github.com> Date: Thu, 4 May 2023 16:48:59 -0400 Subject: [PATCH] backport of commit fd26fd5e7aad7f1161b6ab32ad2ce054e18afce1 (#20521) Co-authored-by: Christopher Swenson --- changelog/20519.txt | 3 +++ scripts/ci-helper.sh | 7 +++---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 changelog/20519.txt diff --git a/changelog/20519.txt b/changelog/20519.txt new file mode 100644 index 000000000000..92f7c291892b --- /dev/null +++ b/changelog/20519.txt @@ -0,0 +1,3 @@ +```release-note:improvement +Add debug symbols back to builds to fix Dynatrace support +``` diff --git a/scripts/ci-helper.sh b/scripts/ci-helper.sh index ba855fc20bc6..227eccfc664e 100755 --- a/scripts/ci-helper.sh +++ b/scripts/ci-helper.sh @@ -151,17 +151,16 @@ function build() { prerelease=$(version_pre) build_date=$(build_date) : "${GO_TAGS:=""}" - : "${KEEP_SYMBOLS:=""}" + : "${REMOVE_SYMBOLS:=""}" # Build our ldflags msg="--> Building Vault v$version, revision $revision, built $build_date" # Keep the symbol and dwarf information by default - # TODO: maybe add REMOVE_SYMBOLS? - if [ -n "$KEEP_SYMBOLS" ]; then + if [ -n "$REMOVE_SYMBOLS" ]; then ldflags="-s -w " else - ldflags="-s -w " + ldflags="" fi ldflags="${ldflags}-X github.com/hashicorp/vault/version.Version=$version -X github.com/hashicorp/vault/version.GitCommit=$revision -X github.com/hashicorp/vault/version.BuildDate=$build_date"