diff options
author | Yurii Soldak <[email protected]> | 2022-12-19 22:12:40 +0100 |
---|---|---|
committer | Ron Evans <[email protected]> | 2022-12-19 23:20:11 +0100 |
commit | 146e2cd37635e0dc0e049fd2420be052e4df957a (patch) | |
tree | b161ca8e6b0ccb2677902a0ab4d50165a76bad73 | |
parent | d304e6706b9a347506e4c906c16c5f8481e0f361 (diff) | |
download | tinygo-146e2cd37635e0dc0e049fd2420be052e4df957a.tar.gz tinygo-146e2cd37635e0dc0e049fd2420be052e4df957a.zip |
build: generate files with go:build tags
-rw-r--r-- | tools/gen-critical-atomics/gen-critical-atomics.go | 2 | ||||
-rwxr-xr-x | tools/gen-device-avr/gen-device-avr.go | 2 | ||||
-rwxr-xr-x | tools/gen-device-svd/gen-device-svd.go | 2 |
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}} // |