]> Cypherpunks repositories - gostls13.git/commit
cmd/go: use cgo -srcdir when using SWIG
authorIan Lance Taylor <iant@golang.org>
Tue, 1 Nov 2016 19:06:22 +0000 (12:06 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 2 Nov 2016 13:37:24 +0000 (13:37 +0000)
commit7bf0fc9fc392acee87bcdb4b1e474e342cb70f92
tree737ad1e5b4fc8467b0a0a68abd4d54d77e67efac
parente22b5efb36e5977590d760c98db9f3fabaea7202
cmd/go: use cgo -srcdir when using SWIG

SWIG generates cgo input files in the work directory. When those files
are passed directly to cgo, cgo generates long file names that include
the object directory (with slashes replaced by underscores). Instead,
use cgo's new -srcdir option to give it short file names.

When using both SWIG and cgo, copy the cgo files into the object
directory first.

Use a shorter object file name when compiling the C file generated by
SWIG.

Fixes #17070.

Change-Id: Ic558603f1731636d9999f3130ad0224b24bd7dcb
Reviewed-on: https://go-review.googlesource.com/32485
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
src/cmd/go/build.go