mirror of
https://github.com/golang/go
synced 2024-11-24 00:40:12 -07:00
cmd/cgo: remove support for CGOPKGPATH
CGOPKGPATH variable was undocumented, but it is not needed anymore. It was used before the existence of the go tool to tell cgo the full path of the package that it was building, which in turn set the name of the shared library that cgo expected to load back when cgo used shared libraries. CGOPKGPATH no longer does anything useful; it just affects the comments in the generated header file. Remove it to avoid any future confusion. Fixes #11852 Change-Id: Ieb452e5bbcfd05b87a4a3618b5b8f44423341858 Reviewed-on: https://go-review.googlesource.com/15266 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
89a68e9f1a
commit
f12b6208f6
@ -279,11 +279,7 @@ func main() {
|
||||
if nerrors > 0 {
|
||||
os.Exit(2)
|
||||
}
|
||||
pkg := f.Package
|
||||
if dir := os.Getenv("CGOPKGPATH"); dir != "" {
|
||||
pkg = filepath.Join(dir, pkg)
|
||||
}
|
||||
p.PackagePath = pkg
|
||||
p.PackagePath = f.Package
|
||||
p.Record(f)
|
||||
if *godefs {
|
||||
os.Stdout.WriteString(p.godefs(f, input))
|
||||
|
@ -2875,7 +2875,7 @@ func (b *builder) cgo(p *Package, cgoExe, obj string, pcCFLAGS, pcLDFLAGS, cgofi
|
||||
cgoCPPFLAGS = append(cgoCPPFLAGS, "-I", obj)
|
||||
|
||||
// cgo
|
||||
// TODO: CGOPKGPATH, CGO_FLAGS?
|
||||
// TODO: CGO_FLAGS?
|
||||
gofiles := []string{obj + "_cgo_gotypes.go"}
|
||||
cfiles := []string{"_cgo_main.c", "_cgo_export.c"}
|
||||
for _, fn := range cgofiles {
|
||||
|
Loading…
Reference in New Issue
Block a user