]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.simd] simd: add goexperiment tag to generate.go
authorCherry Mui <cherryyz@google.com>
Mon, 24 Nov 2025 16:24:00 +0000 (11:24 -0500)
committerCherry Mui <cherryyz@google.com>
Mon, 24 Nov 2025 19:47:27 +0000 (11:47 -0800)
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>

src/go/doc/comment/std.go
src/simd/generate.go
src/simd/internal/simd_test/generate.go [moved from src/simd/internal/simd_test/no_tag.go with 58% similarity]

index 73cf9627a02b58404cba7cffe1912d2bd448d3b6..191e1f129107decfc9824d33fae17b275d9aa17a 100644 (file)
@@ -35,7 +35,6 @@ var stdPkgs = []string{
        "reflect",
        "regexp",
        "runtime",
-       "simd",
        "slices",
        "sort",
        "strconv",
index 95ae5d785179f14cdd8c5647b212664fd5f51f07..5cd94e165e814d4f0f76e1ced68ae82c7bdcd461 100644 (file)
@@ -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
similarity index 58%
rename from src/simd/internal/simd_test/no_tag.go
rename to src/simd/internal/simd_test/generate.go
index 0cc6185b5a212efbc5f5a128afd1f01553e36d7b..e744a5299f8328937465466f3f95728b59f35bd7 100644 (file)
@@ -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