github.com/searKing/golang/go@v1.2.117/runtime/cgosymbolizer/cgo.go (about) 1 // Copyright 2020 The searKing Author. 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 // Package cgosymbolizer contains runtime support for code generated 6 // by the cgo tool. See the documentation for the cgo command 7 // for details on using cgo. 8 package cgosymbolizer 9 10 /* 11 12 #cgo darwin,!arm,!arm64 LDFLAGS: -lpthread 13 #cgo darwin,arm LDFLAGS: -framework CoreFoundation 14 #cgo darwin,arm64 LDFLAGS: -framework CoreFoundation 15 #cgo dragonfly LDFLAGS: -lpthread 16 #cgo freebsd LDFLAGS: -lpthread 17 #cgo android LDFLAGS: -llog 18 #cgo !android,linux LDFLAGS: -lpthread 19 #cgo netbsd LDFLAGS: -lpthread 20 #cgo openbsd LDFLAGS: -lpthread 21 #cgo aix LDFLAGS: -Wl,-berok 22 #cgo solaris LDFLAGS: -lxnet 23 24 //#cgo CFLAGS: -Wall -Werror 25 26 #cgo solaris CPPFLAGS: -D_POSIX_PTHREAD_SEMANTICS 27 #cgo CXXFLAGS: -I${SRCDIR}/include/ 28 #cgo windows CXXFLAGS: -g 29 #cgo !windows CXXFLAGS: -g -D_GNU_SOURCE 30 #cgo linux LDFLAGS: -ldl 31 32 #include <stdio.h> 33 #include <stdlib.h> // Needed for C.free 34 */ 35 import "C"