Skip to content

Commit

Permalink
Keep symbols tables for fips builds
Browse files Browse the repository at this point in the history
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@chainguard.dev>
  • Loading branch information
xnox committed Mar 13, 2024
1 parent 320b06b commit 58d90f8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/build/pipelines/go/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ pipeline:
- runs: |
LDFLAGS="${{inputs.strip}} ${{inputs.ldflags}}"
# Make fips binaries have symbols table by default
case "${{inputs.go-package}}" in
*-fips*)
LDFLAGS="$(echo $LDFLAGS | sed 's/-s //g')"
;;
esac
BASE_PATH="${{inputs.prefix}}/${{inputs.install-dir}}/${{inputs.output}}"
# Take advantage of melange's buid cache for downloaded modules
Expand Down
7 changes: 7 additions & 0 deletions pkg/build/pipelines/go/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ pipeline:
LDFLAGS="${{inputs.strip}} ${{inputs.ldflags}}"
VERSION=""
# Make fips binaries have symbols table by default
case "${{inputs.go-package}}" in
*-fips*)
LDFLAGS="$(echo $LDFLAGS | sed 's/-s //g')"
;;
esac
# Installed binaries will be stored in a tmp dir
export GOBIN=$(mktemp -d)
Expand Down

0 comments on commit 58d90f8

Please sign in to comment.