mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.simd] simd: add goexperiment tag to generate.go
So the simd package does not exist, instead of existing as an empty package, if the goexperiment is not enabled. Unfortunately the simd package developers have to run GOEXPERIMENT=simd go generate, especially if one is not on an AMD64 machine. But that command is still simple enough, not too bad. Change-Id: I632ce92ecb72e208212e294d8b3448b43fd01eef Reviewed-on: https://go-review.googlesource.com/c/go/+/723802 Reviewed-by: Junyang Shao <shaojunyang@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
f045ed4110
commit
61a5a6b016
3 changed files with 5 additions and 6 deletions
|
|
@ -35,7 +35,6 @@ var stdPkgs = []string{
|
|||
"reflect",
|
||||
"regexp",
|
||||
"runtime",
|
||||
"simd",
|
||||
"slices",
|
||||
"sort",
|
||||
"strconv",
|
||||
|
|
|
|||
|
|
@ -2,11 +2,10 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build goexperiment.simd
|
||||
|
||||
package simd
|
||||
|
||||
// Invoke code generators.
|
||||
//
|
||||
// This file intentionally has no goexperiment.simd build tag, so that go
|
||||
// generate can run without a GOEXPERIMENT set.
|
||||
|
||||
//go:generate go run -C _gen . -tmplgen -simdgen
|
||||
|
|
|
|||
|
|
@ -2,9 +2,10 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build goexperiment.simd
|
||||
|
||||
package simd
|
||||
|
||||
// This file has no build tag, so that go generate can run without a build tag.
|
||||
// It does the same thing as go generate in the grandparent directory.
|
||||
// Invoke code generators.
|
||||
|
||||
//go:generate go run -C ../.. genfiles.go
|
||||
Loading…
Add table
Add a link
Reference in a new issue