mirror of
https://github.com/golang/go
synced 2024-11-11 19:01:37 -07:00
misc/cgo: remove +build lines, add go:build where needed
Change-Id: Iae6ac32db5c2aacb323793a7e0dc34e09648d035 Reviewed-on: https://go-review.googlesource.com/c/go/+/482295 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
7b1e0bb79c
commit
369d7119de
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build ignore
|
||||
// +build ignore
|
||||
|
||||
// Compute Fibonacci numbers with two goroutines
|
||||
// that pass integers back and forth. No actual
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build ignore
|
||||
// +build ignore
|
||||
|
||||
package main
|
||||
|
||||
|
@ -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 gc
|
||||
//go:build gc
|
||||
|
||||
#include "_cgo_export.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 gccgo
|
||||
//go:build gccgo
|
||||
|
||||
#include "_cgo_export.h"
|
||||
#include <stdint.h>
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build linux && freebsd && openbsd
|
||||
// +build linux,freebsd,openbsd
|
||||
|
||||
package cgotest
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package cgotest
|
||||
|
||||
|
@ -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 darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
||||
|
||||
#include <pthread.h>
|
||||
#include "_cgo_export.h"
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build linux && cgo
|
||||
// +build linux,cgo
|
||||
|
||||
package cgotest
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
// Issue 18146: pthread_create failure during syscall.Exec.
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build darwin && cgo && !internal
|
||||
// +build darwin,cgo,!internal
|
||||
|
||||
package cgotest
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !darwin || !cgo || internal
|
||||
// +build !darwin !cgo internal
|
||||
|
||||
package cgotest
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build darwin
|
||||
// +build darwin
|
||||
|
||||
package issue24161arg
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build darwin
|
||||
// +build darwin
|
||||
|
||||
package issue24161arg
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build darwin
|
||||
// +build darwin
|
||||
|
||||
package issue24161e0
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build darwin
|
||||
// +build darwin
|
||||
|
||||
package issue24161e1
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build darwin
|
||||
// +build darwin
|
||||
|
||||
package issue24161e2
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build darwin
|
||||
// +build darwin
|
||||
|
||||
package issue24161res
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
// Issue 29563: internal linker fails on duplicate weak symbols.
|
||||
// No runtime test; just make sure it compiles.
|
||||
|
@ -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 !windows,!static
|
||||
// +build !darwin !internal_pie,!arm64
|
||||
//go:build !windows && !static && (!darwin || (!internal_pie && !arm64))
|
||||
|
||||
#include <stdint.h>
|
||||
#include <dlfcn.h>
|
||||
|
@ -3,9 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !windows && !static && (!darwin || (!internal_pie && !arm64))
|
||||
// +build !windows
|
||||
// +build !static
|
||||
// +build !darwin !internal_pie,!arm64
|
||||
|
||||
// Excluded in darwin internal linking PIE mode, as dynamic export is not
|
||||
// supported.
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build windows || static || (darwin && internal_pie) || (darwin && arm64)
|
||||
// +build windows static darwin,internal_pie darwin,arm64
|
||||
|
||||
package cgotest
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package cgotest
|
||||
|
||||
|
@ -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 !android
|
||||
//go:build !android
|
||||
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !android
|
||||
// +build !android
|
||||
|
||||
// Test that pthread_cancel works as expected
|
||||
// (NPTL uses SIGRTMIN to implement thread cancellation)
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package cgotest
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !android
|
||||
// +build !android
|
||||
|
||||
package cgotest
|
||||
|
||||
|
@ -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 gc
|
||||
//go:build gc
|
||||
|
||||
#include "textflag.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 amd64 amd64p32
|
||||
// +build gc
|
||||
//go:build (amd64 || amd64p32) && gc
|
||||
|
||||
#include "textflag.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 gc
|
||||
//go:build gc
|
||||
|
||||
#include "textflag.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 gc
|
||||
//go:build gc
|
||||
|
||||
#include "textflag.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 mips64 mips64le
|
||||
// +build gc
|
||||
//go:build (mips64 || mips64le) && gc
|
||||
|
||||
#include "textflag.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 mips mipsle
|
||||
// +build gc
|
||||
//go:build (mips || mipsle) && gc
|
||||
|
||||
#include "textflag.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 gc
|
||||
//go:build (ppc64 || ppc64le) && gc
|
||||
|
||||
#include "textflag.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 riscv64
|
||||
// +build gc
|
||||
//go:build riscv64 && gc
|
||||
|
||||
#include "textflag.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 gc
|
||||
//go:build gc
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build gccgo
|
||||
// +build gccgo
|
||||
|
||||
package issue9400
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build gc
|
||||
// +build gc
|
||||
|
||||
package issue9400
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !windows && !android
|
||||
// +build !windows,!android
|
||||
|
||||
// Test that the Go runtime still works if C code changes the signal stack.
|
||||
|
||||
|
@ -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 !windows
|
||||
//go:build !windows
|
||||
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package cgotest
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package cgotest
|
||||
|
||||
|
1
misc/cgo/testcshared/testdata/libgo2/dup2.go
vendored
1
misc/cgo/testcshared/testdata/libgo2/dup2.go
vendored
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build darwin || dragonfly || freebsd || (linux && !arm64 && !riscv64) || netbsd || openbsd
|
||||
// +build darwin dragonfly freebsd linux,!arm64,!riscv64 netbsd openbsd
|
||||
|
||||
package main
|
||||
|
||||
|
1
misc/cgo/testcshared/testdata/libgo2/dup3.go
vendored
1
misc/cgo/testcshared/testdata/libgo2/dup3.go
vendored
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build (linux && arm64) || (linux && riscv64)
|
||||
// +build linux,arm64 linux,riscv64
|
||||
|
||||
package main
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||
|
||||
package main
|
||||
|
||||
|
3
misc/cgo/testgodefs/testdata/anonunion.go
vendored
3
misc/cgo/testgodefs/testdata/anonunion.go
vendored
@ -1,9 +1,8 @@
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
//
|
||||
|
||||
//go:build ignore
|
||||
// +build ignore
|
||||
|
||||
package main
|
||||
|
||||
|
3
misc/cgo/testgodefs/testdata/bitfields.go
vendored
3
misc/cgo/testgodefs/testdata/bitfields.go
vendored
@ -1,9 +1,8 @@
|
||||
// Copyright 2020 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
//
|
||||
|
||||
//go:build ignore
|
||||
// +build ignore
|
||||
|
||||
package main
|
||||
|
||||
|
3
misc/cgo/testgodefs/testdata/fieldtypedef.go
vendored
3
misc/cgo/testgodefs/testdata/fieldtypedef.go
vendored
@ -1,9 +1,8 @@
|
||||
// Copyright 2018 The Go Authors. All rights reserve d.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
//
|
||||
|
||||
//go:build ignore
|
||||
// +build ignore
|
||||
|
||||
package main
|
||||
|
||||
|
3
misc/cgo/testgodefs/testdata/issue37479.go
vendored
3
misc/cgo/testgodefs/testdata/issue37479.go
vendored
@ -1,9 +1,8 @@
|
||||
// Copyright 2020 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
//
|
||||
|
||||
//go:build ignore
|
||||
// +build ignore
|
||||
|
||||
package main
|
||||
|
||||
|
3
misc/cgo/testgodefs/testdata/issue37621.go
vendored
3
misc/cgo/testgodefs/testdata/issue37621.go
vendored
@ -1,9 +1,8 @@
|
||||
// Copyright 2020 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
//
|
||||
|
||||
//go:build ignore
|
||||
// +build ignore
|
||||
|
||||
package main
|
||||
|
||||
|
3
misc/cgo/testgodefs/testdata/issue38649.go
vendored
3
misc/cgo/testgodefs/testdata/issue38649.go
vendored
@ -1,9 +1,8 @@
|
||||
// Copyright 2020 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
//
|
||||
|
||||
//go:build ignore
|
||||
// +build ignore
|
||||
|
||||
package main
|
||||
|
||||
|
3
misc/cgo/testgodefs/testdata/issue39534.go
vendored
3
misc/cgo/testgodefs/testdata/issue39534.go
vendored
@ -1,9 +1,8 @@
|
||||
// Copyright 2020 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
//
|
||||
|
||||
//go:build ignore
|
||||
// +build ignore
|
||||
|
||||
package main
|
||||
|
||||
|
3
misc/cgo/testgodefs/testdata/issue48396.go
vendored
3
misc/cgo/testgodefs/testdata/issue48396.go
vendored
@ -1,9 +1,8 @@
|
||||
// Copyright 2021 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
//
|
||||
|
||||
//go:build ignore
|
||||
// +build ignore
|
||||
|
||||
package main
|
||||
|
||||
|
3
misc/cgo/testgodefs/testdata/issue8478.go
vendored
3
misc/cgo/testgodefs/testdata/issue8478.go
vendored
@ -1,9 +1,8 @@
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
//
|
||||
|
||||
//go:build ignore
|
||||
// +build ignore
|
||||
|
||||
package main
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build ignore
|
||||
// +build ignore
|
||||
|
||||
package main
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build ignore
|
||||
// +build ignore
|
||||
|
||||
package main
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build ignore
|
||||
// +build ignore
|
||||
|
||||
package main
|
||||
|
||||
|
2
misc/cgo/testshared/testdata/depBase/asm.s
vendored
2
misc/cgo/testshared/testdata/depBase/asm.s
vendored
@ -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 gc
|
||||
//go:build gc
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build gccgo
|
||||
// +build gccgo
|
||||
|
||||
package depBase
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build gc
|
||||
// +build gc
|
||||
|
||||
package depBase
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !cgo
|
||||
// +build !cgo
|
||||
|
||||
package so_test
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build cgo
|
||||
// +build cgo
|
||||
|
||||
package so_test
|
||||
|
||||
|
2
misc/cgo/testso/testdata/cgoso_c.c
vendored
2
misc/cgo/testso/testdata/cgoso_c.c
vendored
@ -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 ignore
|
||||
//go:build ignore
|
||||
|
||||
#ifdef WIN32
|
||||
// A Windows DLL is unable to call an arbitrary function in
|
||||
|
1
misc/cgo/testso/testdata/cgoso_unix.go
vendored
1
misc/cgo/testso/testdata/cgoso_unix.go
vendored
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build aix || dragonfly || freebsd || linux || netbsd || solaris
|
||||
// +build aix dragonfly freebsd linux netbsd solaris
|
||||
|
||||
package cgosotest
|
||||
|
||||
|
1
misc/cgo/testso/testdata/main.go
vendored
1
misc/cgo/testso/testdata/main.go
vendored
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build ignore
|
||||
// +build ignore
|
||||
|
||||
package main
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !cgo
|
||||
// +build !cgo
|
||||
|
||||
package so_test
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build cgo
|
||||
// +build cgo
|
||||
|
||||
package so_test
|
||||
|
||||
|
2
misc/cgo/testsovar/testdata/cgoso_c.c
vendored
2
misc/cgo/testsovar/testdata/cgoso_c.c
vendored
@ -2,6 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build ignore
|
||||
//go:build ignore
|
||||
|
||||
const char *exported_var = "Hello world";
|
||||
|
2
misc/cgo/testsovar/testdata/cgoso_c.h
vendored
2
misc/cgo/testsovar/testdata/cgoso_c.h
vendored
@ -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 ignore
|
||||
//go:build ignore
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined(EXPORT_DLL)
|
||||
|
1
misc/cgo/testsovar/testdata/main.go
vendored
1
misc/cgo/testsovar/testdata/main.go
vendored
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build ignore
|
||||
// +build ignore
|
||||
|
||||
package main
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package cgotlstest
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user