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>
< 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.
--- /dev/null
+// 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
--- /dev/null
+// 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
--- /dev/null
+//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.
--- /dev/null
+//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.