mirror of
https://github.com/golang/go
synced 2024-11-14 08:10:22 -07:00
cmd/cgo: fix windows build
The shared library changes broke the windows build because __attribute__ ((visibility ("hidden"))) is not supported in windows gcc. This change removes the attribute, as it is only needed when building shared libraries. R=rsc CC=golang-dev https://golang.org/cl/12829044
This commit is contained in:
parent
13c7896fb6
commit
a5f257a042
@ -494,7 +494,7 @@ func (p *Package) writeOutputFunc(fgcc *os.File, n *Name) {
|
|||||||
|
|
||||||
// Gcc wrapper unpacks the C argument struct
|
// Gcc wrapper unpacks the C argument struct
|
||||||
// and calls the actual C function.
|
// and calls the actual C function.
|
||||||
fmt.Fprintf(fgcc, "__attribute__ ((visibility (\"hidden\"))) void\n")
|
fmt.Fprintf(fgcc, "void\n")
|
||||||
fmt.Fprintf(fgcc, "_cgo%s%s(void *v)\n", cPrefix, n.Mangle)
|
fmt.Fprintf(fgcc, "_cgo%s%s(void *v)\n", cPrefix, n.Mangle)
|
||||||
fmt.Fprintf(fgcc, "{\n")
|
fmt.Fprintf(fgcc, "{\n")
|
||||||
if n.AddError {
|
if n.AddError {
|
||||||
|
Loading…
Reference in New Issue
Block a user