mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
56d1faa8b6
commit
fb59aed60b
7 changed files with 65 additions and 23 deletions
|
|
@ -139,11 +139,7 @@ NextLine:
|
|||
// addToFlag appends args to flag. All flags are later written out onto the
|
||||
// _cgo_flags file for the build system to use.
|
||||
func (p *Package) addToFlag(flag string, args []string) {
|
||||
if oldv, ok := p.CgoFlags[flag]; ok {
|
||||
p.CgoFlags[flag] = oldv + " " + strings.Join(args, " ")
|
||||
} else {
|
||||
p.CgoFlags[flag] = strings.Join(args, " ")
|
||||
}
|
||||
p.CgoFlags[flag] = append(p.CgoFlags[flag], args...)
|
||||
if flag == "CFLAGS" {
|
||||
// We'll also need these when preprocessing for dwarf information.
|
||||
p.GccOptions = append(p.GccOptions, args...)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue