Skip to content

Commit

Permalink
cmd/go: trim spaces in pkg-config ldflags output
Browse files Browse the repository at this point in the history
Fixes #58889
Updates #35262

Change-Id: I1d51aa03f445faaf4f4e9cc412d5499cad526663
Reviewed-on: https://go-review.googlesource.com/c/go/+/473616
Reviewed-by: Bryan Mills <[email protected]>
Run-TryBot: Quim Muntal <[email protected]>
Auto-Submit: Quim Muntal <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
  • Loading branch information
qmuntal authored and gopherbot committed Mar 6, 2023
1 parent b94dc38 commit 142d30b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd/go/internal/work/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -1634,7 +1634,7 @@ func (b *Builder) getPkgConfigFlags(p *load.Package) (cflags, ldflags []string,
if len(out) > 0 {
// We need to handle path with spaces so that C:/Program\ Files can pass
// checkLinkerFlags. Use splitPkgConfigOutput here just like we treat cflags.
ldflags, err = splitPkgConfigOutput(out)
ldflags, err = splitPkgConfigOutput(bytes.TrimSpace(out))
if err != nil {
return nil, nil, err
}
Expand Down

0 comments on commit 142d30b

Please sign in to comment.