mirror of
https://github.com/golang/go
synced 2024-11-18 07:04:52 -07:00
runtime/race: introduce subarch versioning of race syso
Allow us to select a race .syso file based on subarch values. Note that this doesn't actually change the syso used. This CL just moves things around in preparation for adding v3-specific versions in future CLs. Change-Id: I14e3c273a7c6f07b13b22193b7a851ea94c765cb Reviewed-on: https://go-review.googlesource.com/c/go/+/424034 Reviewed-by: Than McIntosh <thanm@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@google.com> Run-TryBot: Keith Randall <khr@golang.org>
This commit is contained in:
parent
7c3284401f
commit
e665de2861
@ -301,7 +301,12 @@ var depsRules = `
|
||||
< C
|
||||
< runtime/cgo
|
||||
< CGO
|
||||
< runtime/race, runtime/msan, runtime/asan;
|
||||
< runtime/msan, runtime/asan;
|
||||
|
||||
# runtime/race
|
||||
NONE < runtime/race/internal/amd64v1;
|
||||
NONE < runtime/race/internal/amd64v3;
|
||||
CGO, runtime/race/internal/amd64v1, runtime/race/internal/amd64v3 < runtime/race;
|
||||
|
||||
# Bulk of the standard library must not use cgo.
|
||||
# The prohibition stops at net and os/user.
|
||||
|
8
src/runtime/race/internal/amd64v1/doc.go
Normal file
8
src/runtime/race/internal/amd64v1/doc.go
Normal file
@ -0,0 +1,8 @@
|
||||
// Copyright 2022 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.
|
||||
|
||||
// This package holds the race detector .syso for
|
||||
// amd64 architectures with GOAMD64<v3.
|
||||
|
||||
package amd64v1
|
8
src/runtime/race/internal/amd64v3/doc.go
Normal file
8
src/runtime/race/internal/amd64v3/doc.go
Normal file
@ -0,0 +1,8 @@
|
||||
// Copyright 2022 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.
|
||||
|
||||
// This package holds the race detector .syso for
|
||||
// amd64 architectures with GOAMD64>=v3.
|
||||
|
||||
package amd64v3
|
10
src/runtime/race/race_v1_amd64.go
Normal file
10
src/runtime/race/race_v1_amd64.go
Normal file
@ -0,0 +1,10 @@
|
||||
//go:build linux || darwin || freebsd || netbsd || openbsd || windows
|
||||
// +build linux darwin freebsd netbsd openbsd windows
|
||||
|
||||
package race
|
||||
|
||||
import _ "runtime/race/internal/amd64v1"
|
||||
|
||||
// Note: the build line above will eventually be something
|
||||
// like go:build linux && !amd64.v3 || darwin && !amd64.v3 || ...
|
||||
// as we build v3 versions for each OS.
|
10
src/runtime/race/race_v3_amd64.go
Normal file
10
src/runtime/race/race_v3_amd64.go
Normal file
@ -0,0 +1,10 @@
|
||||
//go:build none
|
||||
// +build none
|
||||
|
||||
package race
|
||||
|
||||
import _ "runtime/race/internal/amd64v3"
|
||||
|
||||
// Note: the build line above will eventually be something
|
||||
// like go:build linux && amd64.v3 || darwin && amd64.v3 || ...
|
||||
// as we build v3 versions for each OS.
|
Loading…
Reference in New Issue
Block a user