mirror of https://github.com/golang/go.git
In CL 293250, I changed x/tools/go/loader to invoke cgo using the -srcdir option, rather than chdir'ing into the source directory. But evidently cgo's -srcdir option does not affect #include processing of relative file paths, so this ended up breaking packages that relied on the latter. This CL reverts back to chdir'ing into the source directory, but also sets the PWD environment variable. This appears to be how cmd/go invokes tools and handles symlinks. Fixes golang/go#46877. Change-Id: Ia538c5d8722b151a4547f73188f6537e0551136f Reviewed-on: https://go-review.googlesource.com/c/tools/+/331409 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> |
||
|---|---|---|
| .. | ||
| cgo | ||
| gccgoimporter | ||
| gcimporter | ||
| packagesdriver | ||