Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep symbols by default #20519

Merged
merged 2 commits into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/20519.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
Add debug symbols back to builds to fix Dynatrace support
```
7 changes: 3 additions & 4 deletions scripts/ci-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,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"
Expand Down