You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This command works: XCADDY_GO_BUILD_FLAGS="-ldflags '-w -s -extldflags=-static'" xcaddy build
But this is not working: GOOS='windows' GOARCH='amd64' XCADDY_GO_BUILD_FLAGS="-ldflags '-w -s'" xcaddy build
Found it. It's because the flags are appended to the end as argument instead of right after the sub-command of go, so the go command assumes it's a Go module in that position. The relevant code paths are here, if anyone wants to beat us to the fix:
This command works:
XCADDY_GO_BUILD_FLAGS="-ldflags '-w -s -extldflags=-static'" xcaddy build
But this is not working:
GOOS='windows' GOARCH='amd64' XCADDY_GO_BUILD_FLAGS="-ldflags '-w -s'" xcaddy build
second command's output:
The text was updated successfully, but these errors were encountered: