aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYurii Soldak <[email protected]>2022-12-19 22:12:40 +0100
committerRon Evans <[email protected]>2022-12-19 23:20:11 +0100
commit146e2cd37635e0dc0e049fd2420be052e4df957a (patch)
treeb161ca8e6b0ccb2677902a0ab4d50165a76bad73
parentd304e6706b9a347506e4c906c16c5f8481e0f361 (diff)
downloadtinygo-146e2cd37635e0dc0e049fd2420be052e4df957a.tar.gz
tinygo-146e2cd37635e0dc0e049fd2420be052e4df957a.zip
build: generate files with go:build tags
-rw-r--r--tools/gen-critical-atomics/gen-critical-atomics.go2
-rwxr-xr-xtools/gen-device-avr/gen-device-avr.go2
-rwxr-xr-xtools/gen-device-svd/gen-device-svd.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/tools/gen-critical-atomics/gen-critical-atomics.go b/tools/gen-critical-atomics/gen-critical-atomics.go
index f444c1c3d..75ea32707 100644
--- a/tools/gen-critical-atomics/gen-critical-atomics.go
+++ b/tools/gen-critical-atomics/gen-critical-atomics.go
@@ -17,7 +17,7 @@ var tmpl = template.Must(template.New("go").Funcs(template.FuncMap{
return v
},
"title": strings.Title,
-}).Parse(`//+build baremetal,!tinygo.wasm
+}).Parse(`//go:build baremetal && !tinygo.wasm
// Automatically generated file. DO NOT EDIT.
// This file implements standins for non-native atomics using critical sections.
diff --git a/tools/gen-device-avr/gen-device-avr.go b/tools/gen-device-avr/gen-device-avr.go
index 1e841b954..7885eef3a 100755
--- a/tools/gen-device-avr/gen-device-avr.go
+++ b/tools/gen-device-avr/gen-device-avr.go
@@ -285,7 +285,7 @@ func writeGo(outdir string, device *Device) error {
t := template.Must(template.New("go").Parse(`// Automatically generated file. DO NOT EDIT.
// Generated by gen-device-avr.go from {{.metadata.file}}, see {{.metadata.descriptorSource}}
-// +build {{.pkgName}},{{.metadata.nameLower}}
+//go:build {{.pkgName}} && {{.metadata.nameLower}}
// {{.metadata.description}}
package {{.pkgName}}
diff --git a/tools/gen-device-svd/gen-device-svd.go b/tools/gen-device-svd/gen-device-svd.go
index f10b7d239..ce1f7ed13 100755
--- a/tools/gen-device-svd/gen-device-svd.go
+++ b/tools/gen-device-svd/gen-device-svd.go
@@ -875,7 +875,7 @@ func writeGo(outdir string, device *Device, interruptSystem string) error {
}).Parse(`// Automatically generated file. DO NOT EDIT.
// Generated by gen-device-svd.go from {{.device.Metadata.File}}, see {{.device.Metadata.DescriptorSource}}
-// +build {{.pkgName}},{{.device.Metadata.NameLower}}
+//go:build {{.pkgName}} && {{.device.Metadata.NameLower}}
// {{.device.Metadata.Description}}
//