aboutsummaryrefslogtreecommitdiff
path: root/src/simd
diff options
context:
space:
mode:
authorCherry Mui <cherryyz@google.com>2025-11-24 11:24:00 -0500
committerCherry Mui <cherryyz@google.com>2025-11-24 11:47:27 -0800
commit61a5a6b016986cc56fe52c360654bbbd875efa4e (patch)
tree684fbac0bdbb10cfe0fa93976332c974cf31c102 /src/simd
parentf045ed4110aa430da0ba118d2be46f0d602d6633 (diff)
downloadgo-61a5a6b016986cc56fe52c360654bbbd875efa4e.tar.xz
[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>
Diffstat (limited to 'src/simd')
-rw-r--r--src/simd/generate.go5
-rw-r--r--src/simd/internal/simd_test/generate.go (renamed from src/simd/internal/simd_test/no_tag.go)5
2 files changed, 5 insertions, 5 deletions
diff --git a/src/simd/generate.go b/src/simd/generate.go
index 95ae5d7851..5cd94e165e 100644
--- a/src/simd/generate.go
+++ b/src/simd/generate.go
@@ -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
diff --git a/src/simd/internal/simd_test/no_tag.go b/src/simd/internal/simd_test/generate.go
index 0cc6185b5a..e744a5299f 100644
--- a/src/simd/internal/simd_test/no_tag.go
+++ b/src/simd/internal/simd_test/generate.go
@@ -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