cmd/cgo: split cgo_export into cgo_export_static and cgo_export_dynamic

Also emit cgo_ldflag pragmas.

R=golang-dev, remyoudompheng, iant
CC=golang-dev
https://golang.org/cl/7530043
This commit is contained in:
Russ Cox 2013-03-06 16:57:14 -05:00
parent 56d1faa8b6
commit fb59aed60b
7 changed files with 65 additions and 23 deletions

View file

@ -33,7 +33,7 @@ type Package struct {
PtrSize int64
IntSize int64
GccOptions []string
CgoFlags map[string]string // #cgo flags (CFLAGS, LDFLAGS)
CgoFlags map[string][]string // #cgo flags (CFLAGS, LDFLAGS)
Written map[string]bool
Name map[string]*Name // accumulated Name from Files
ExpFunc []*ExpFunc // accumulated ExpFunc from Files
@ -312,7 +312,7 @@ func newPackage(args []string) *Package {
PtrSize: ptrSize,
IntSize: intSize,
GccOptions: gccOptions,
CgoFlags: make(map[string]string),
CgoFlags: make(map[string][]string),
Written: make(map[string]bool),
}
return p