]> Cypherpunks repositories - gostls13.git/commit
cmd/go: support cgo files in overlays
authorMichael Matloob <matloob@golang.org>
Thu, 15 Oct 2020 15:50:31 +0000 (11:50 -0400)
committerMichael Matloob <matloob@golang.org>
Sat, 31 Oct 2020 00:35:33 +0000 (00:35 +0000)
commit48be3ed1394d85af5a7e1a6313fa9cab4d1b7cf9
tree3265d54c533531da14ac760471fd9419bd902fd6
parent79fb187be4d1a1a93c01b3a6be66ea529311ea84
cmd/go: support cgo files in overlays

This requires rewriting the paths of the files passed to the cgo tool
toolchain to use the overlaid paths instead of the disk paths of
files. Because the directories of the overlaid paths don't exist in
general, the cgo tool have been updated to run in base.Cwd instead of
the package directory.

For #39958

Change-Id: I8986de889f56ecc2e64fa69f5f6f29fa907408f9
Reviewed-on: https://go-review.googlesource.com/c/go/+/262618
Trust: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/work/exec.go
src/cmd/go/internal/work/gc.go
src/cmd/go/testdata/script/build_overlay.txt
src/cmd/go/testdata/script/build_trimpath_cgo.txt