]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/cgo: add cgo build tag to C files
authorRuss Cox <rsc@golang.org>
Wed, 27 Jan 2016 20:58:52 +0000 (15:58 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 27 Jan 2016 21:12:30 +0000 (21:12 +0000)
This makes "CGO_ENABLED=0 go list runtime/cgo" work,
which fixes the current cmd/go test failure.

Change-Id: Ia55ce3ba1dbb09f618ae5f4c8547722670360f59
Reviewed-on: https://go-review.googlesource.com/19001
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/runtime/cgo/gcc_darwin_amd64.c
src/runtime/cgo/gcc_libinit.c
src/runtime/cgo/gcc_setenv.c
src/runtime/cgo/gcc_util.c

index dc679acab9d5caf94f3819901a41b3a8773c0f58..b70c83345f5f11beaee86fe5b31f40ab885d49fb 100644 (file)
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build cgo
+
 #include <string.h> /* for strerror */
 #include <pthread.h>
 #include <signal.h>
index c3e94f58d2c902c3652cd58a3a840e496074637f..5b9558aabc8350bb0bb41fdb73b94cfd133a5f3d 100644 (file)
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build cgo
 // +build darwin dragonfly freebsd linux netbsd solaris
 // +build !ppc64,!ppc64le
 
index ca29dcb05f2040cde508f766e2432c85ea0e1947..c976ac3d37c4e6addf3864748a96484003e60a86 100644 (file)
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build cgo
 // +build darwin dragonfly freebsd linux netbsd openbsd solaris
 
 #include "libcgo.h"
index 143734e94b09b1fac40ebd517c9309cfe5704d8d..d5efec396bd36bf58afce817cdd49dc754c5c465 100644 (file)
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build cgo
+
 #include "libcgo.h"
 
 /* Stub for calling malloc from Go */