mirror of https://github.com/golang/go.git
runtime/cgo: use //go:build lines in C and assembly files
Replace deprecated // +build lines by their respective //go:build line counterpart. Also remove build constraints implied by file name or type. Change-Id: I8d18cd40071ca28d7654da8f0d22841f43729ca6 Reviewed-on: https://go-review.googlesource.com/c/go/+/460538 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
0b3f58c48e
commit
91c1c5922d
|
|
@ -3,7 +3,6 @@
|
|||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build mips64 || mips64le
|
||||
// +build mips64 mips64le
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build mips || mipsle
|
||||
// +build mips mipsle
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build ppc64 || ppc64le
|
||||
// +build ppc64 ppc64le
|
||||
|
||||
#include "textflag.h"
|
||||
#include "asm_ppc64x.h"
|
||||
|
|
|
|||
|
|
@ -2,9 +2,6 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build ppc64
|
||||
// +build aix
|
||||
|
||||
.file "gcc_aix_ppc64.S"
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -2,9 +2,6 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build aix
|
||||
// +build ppc64 ppc64le
|
||||
|
||||
/*
|
||||
* On AIX, call to _cgo_topofstack and Go main are forced to be a longcall.
|
||||
* Without it, ld might add trampolines in the middle of .text section
|
||||
|
|
|
|||
|
|
@ -2,8 +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 aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
|
||||
//go:build unix || windows
|
||||
|
||||
#include "libcgo.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build aix !android,linux freebsd
|
||||
//go:build aix || (!android && linux) || freebsd
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build freebsd,amd64
|
||||
//go:build freebsd && amd64
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
|
|
|
|||
|
|
@ -2,8 +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 aix darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||
//go:build unix
|
||||
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build cgo
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
|
|
|
|||
|
|
@ -2,9 +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 linux
|
||||
// +build mips64 mips64le
|
||||
//go:build mips64 || mips64le
|
||||
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
|
|
|
|||
|
|
@ -2,9 +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 linux
|
||||
// +build mips mipsle
|
||||
//go:build mips || mipsle
|
||||
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build ppc64 ppc64le
|
||||
// +build linux
|
||||
//go:build linux && (ppc64 || ppc64le)
|
||||
|
||||
.file "gcc_linux_ppc64x.S"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build mips64 mips64le
|
||||
//go:build mips64 || mips64le
|
||||
|
||||
.file "gcc_mips64x.S"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build mips mipsle
|
||||
//go:build mips || mipsle
|
||||
|
||||
.file "gcc_mipsx.S"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build linux,amd64 linux,arm64 linux,ppc64le freebsd,amd64
|
||||
//go:build (linux && (amd64 || arm64 || ppc64le)) || (freebsd && amd64)
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdint.h>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build ppc64 ppc64le
|
||||
//go:build ppc64 || ppc64le
|
||||
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
|
|
|
|||
|
|
@ -2,8 +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 aix darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||
//go:build unix
|
||||
|
||||
#include "libcgo.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build linux,amd64 linux,arm64 linux,ppc64le
|
||||
//go:build linux && (amd64 || arm64 || ppc64le)
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build lldb
|
||||
//go:build lldb
|
||||
|
||||
// Used by gcc_signal_darwin_arm64.c when doing the test build during cgo.
|
||||
// We hope that for real binaries the definition provided by Go will take precedence
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
//
|
||||
// The dist tool enables this by build flag when testing.
|
||||
|
||||
// +build lldb
|
||||
//go:build lldb
|
||||
|
||||
#include <limits.h>
|
||||
#include <pthread.h>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build !lldb
|
||||
// +build ios
|
||||
// +build arm64
|
||||
//go:build !lldb && ios && arm64
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build cgo,darwin cgo,linux
|
||||
//go:build darwin || linux
|
||||
|
||||
#include <stdint.h>
|
||||
#include "libcgo.h"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build linux
|
||||
//go:build linux
|
||||
|
||||
#ifndef _GNU_SOURCE // setres[ug]id() API.
|
||||
#define _GNU_SOURCE
|
||||
|
|
|
|||
Loading…
Reference in New Issue