Source file src/runtime/cgo/cgo.go

     1  // Copyright 2010 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  /*
     6  Package cgo contains runtime support for code generated
     7  by the cgo tool.  See the documentation for the cgo command
     8  for details on using cgo.
     9  */
    10  package cgo
    11  
    12  /*
    13  
    14  #cgo darwin,!arm64 LDFLAGS: -lpthread
    15  #cgo darwin,arm64 LDFLAGS: -framework CoreFoundation
    16  #cgo dragonfly LDFLAGS: -lpthread
    17  #cgo freebsd LDFLAGS: -lpthread
    18  #cgo android LDFLAGS: -llog
    19  #cgo !android,linux LDFLAGS: -lpthread
    20  #cgo netbsd LDFLAGS: -lpthread
    21  #cgo openbsd LDFLAGS: -lpthread
    22  #cgo aix LDFLAGS: -Wl,-berok
    23  #cgo solaris LDFLAGS: -lxnet
    24  #cgo solaris LDFLAGS: -lsocket
    25  
    26  // Use -fno-stack-protector to avoid problems locating the
    27  // proper support functions. See issues #52919, #54313, #58385.
    28  // Use -Wdeclaration-after-statement because some CI builds use it.
    29  #cgo CFLAGS: -Wall -Werror -fno-stack-protector -Wdeclaration-after-statement
    30  
    31  #cgo solaris CPPFLAGS: -D_POSIX_PTHREAD_SEMANTICS
    32  
    33  */
    34  import "C"
    35  
    36  import "internal/runtime/sys"
    37  
    38  // Incomplete is used specifically for the semantics of incomplete C types.
    39  type Incomplete struct {
    40  	_ sys.NotInHeap
    41  }
    42  

View as plain text