Skip to content

Commit

Permalink
Extend known for Go 1.23 compiler directives
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear committed Nov 20, 2024
1 parent 21d3bfd commit ed6cbb1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions checkcompilerdirectives/checkcompilerdirectives.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,20 @@ func isKnown(directive string) bool {

var known = []string{
// Found by running the following command on the source of go.
// git grep -o -E -h '//go:[a-z_]+' -- ':!**/*_test.go' ':!test/' ':!**/testdata/**' | sort -u
"binary",
// git grep -o -E -h '//go:[a-z_-]+' -- ':!**/*_test.go' ':!test/' ':!**/testdata/**' | sort -u
"binary-only-package",
"build",
"buildsomethingelse",
"cgo_dynamic_linker",
"cgo_export_dynamic",
"cgo_export_static",
"cgo_import_dynamic",
"cgo_import_static",
"cgo_ldflag",
"cgo_unsafe_args",
"debug", // https://go.googlesource.com/go/+/refs/tags/go1.23.3/doc/godebug.md
"embed",
"generate",
"linkname",
"name",
"nocheckptr",
"noescape",
"noinline",
Expand All @@ -101,5 +100,6 @@ var known = []string{
"systemstack",
"uintptrescapes",
"uintptrkeepalive",
"wasmimport", // https://go.googlesource.com/go/+/refs/tags/go1.23.3/src/cmd/compile/internal/noder/noder.go#176
"yeswritebarrierrec",
}

0 comments on commit ed6cbb1

Please sign in to comment.