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>
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
}