Skip to content

Commit 381b814

Browse files
wesmclaude
andcommitted
Pass -lstdc++ via extldflags instead of CGO_LDFLAGS
CGO_LDFLAGS wasn't being applied at link time. Use Go's -extldflags to pass -lstdc++ -lm to the external linker directly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 51fa5b4 commit 381b814

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,12 @@ jobs:
4747
GOOS: linux
4848
GOARCH: ${{ matrix.goarch }}
4949
CGO_ENABLED: '1'
50-
CGO_LDFLAGS: '-lstdc++ -lm'
5150
run: |
5251
export PATH="/usr/local/go/bin:$HOME/go/bin:$PATH"
5352
VERSION=${GITHUB_REF#refs/tags/v}
5453
5554
mkdir -p dist
56-
LDFLAGS="-s -w -X github.com/wesm/msgvault/cmd/msgvault/cmd.Version=v${VERSION}"
55+
LDFLAGS="-s -w -X github.com/wesm/msgvault/cmd/msgvault/cmd.Version=v${VERSION} -extldflags '-lstdc++ -lm'"
5756
go build -tags fts5 -trimpath -buildvcs=false -ldflags="$LDFLAGS" -o dist/msgvault ./cmd/msgvault
5857
5958
echo "--- Binary info ---"

0 commit comments

Comments
 (0)