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>
Showing
Please register or sign in to comment