mirror of
https://github.com/golang/go
synced 2024-09-19 16:01:33 +00:00
cmd/go: trim spaces in pkg-config ldflags output
Fixes #58889 Updates #35262 Change-Id: I1d51aa03f445faaf4f4e9cc412d5499cad526663 Reviewed-on: https://go-review.googlesource.com/c/go/+/473616 Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Quim Muntal <quimmuntal@gmail.com> Auto-Submit: Quim Muntal <quimmuntal@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
parent
b94dc384ca
commit
142d30b2cb
|
@ -1634,7 +1634,7 @@ func (b *Builder) getPkgConfigFlags(p *load.Package) (cflags, ldflags []string,
|
||||||
if len(out) > 0 {
|
if len(out) > 0 {
|
||||||
// We need to handle path with spaces so that C:/Program\ Files can pass
|
// We need to handle path with spaces so that C:/Program\ Files can pass
|
||||||
// checkLinkerFlags. Use splitPkgConfigOutput here just like we treat cflags.
|
// checkLinkerFlags. Use splitPkgConfigOutput here just like we treat cflags.
|
||||||
ldflags, err = splitPkgConfigOutput(out)
|
ldflags, err = splitPkgConfigOutput(bytes.TrimSpace(out))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue