From: Russ Cox Date: Wed, 27 Jan 2016 20:58:52 +0000 (-0500) Subject: runtime/cgo: add cgo build tag to C files X-Git-Tag: go1.6rc1~7 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e3f3f940a09ee99e952be43fd3b19c969cf229d0;p=gostls13.git runtime/cgo: add cgo build tag to C files 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 Reviewed-by: Brad Fitzpatrick --- diff --git a/src/runtime/cgo/gcc_darwin_amd64.c b/src/runtime/cgo/gcc_darwin_amd64.c index dc679acab9..b70c83345f 100644 --- a/src/runtime/cgo/gcc_darwin_amd64.c +++ b/src/runtime/cgo/gcc_darwin_amd64.c @@ -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 /* for strerror */ #include #include diff --git a/src/runtime/cgo/gcc_libinit.c b/src/runtime/cgo/gcc_libinit.c index c3e94f58d2..5b9558aabc 100644 --- a/src/runtime/cgo/gcc_libinit.c +++ b/src/runtime/cgo/gcc_libinit.c @@ -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 diff --git a/src/runtime/cgo/gcc_setenv.c b/src/runtime/cgo/gcc_setenv.c index ca29dcb05f..c976ac3d37 100644 --- a/src/runtime/cgo/gcc_setenv.c +++ b/src/runtime/cgo/gcc_setenv.c @@ -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" diff --git a/src/runtime/cgo/gcc_util.c b/src/runtime/cgo/gcc_util.c index 143734e94b..d5efec396b 100644 --- a/src/runtime/cgo/gcc_util.c +++ b/src/runtime/cgo/gcc_util.c @@ -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 */