build: generate files with go:build tags
Этот коммит содержится в:
родитель
d304e6706b
коммит
146e2cd376
3 изменённых файлов: 3 добавлений и 3 удалений
|
@ -17,7 +17,7 @@ var tmpl = template.Must(template.New("go").Funcs(template.FuncMap{
|
||||||
return v
|
return v
|
||||||
},
|
},
|
||||||
"title": strings.Title,
|
"title": strings.Title,
|
||||||
}).Parse(`//+build baremetal,!tinygo.wasm
|
}).Parse(`//go:build baremetal && !tinygo.wasm
|
||||||
|
|
||||||
// Automatically generated file. DO NOT EDIT.
|
// Automatically generated file. DO NOT EDIT.
|
||||||
// This file implements standins for non-native atomics using critical sections.
|
// This file implements standins for non-native atomics using critical sections.
|
||||||
|
|
|
@ -285,7 +285,7 @@ func writeGo(outdir string, device *Device) error {
|
||||||
t := template.Must(template.New("go").Parse(`// Automatically generated file. DO NOT EDIT.
|
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}}
|
// Generated by gen-device-avr.go from {{.metadata.file}}, see {{.metadata.descriptorSource}}
|
||||||
|
|
||||||
// +build {{.pkgName}},{{.metadata.nameLower}}
|
//go:build {{.pkgName}} && {{.metadata.nameLower}}
|
||||||
|
|
||||||
// {{.metadata.description}}
|
// {{.metadata.description}}
|
||||||
package {{.pkgName}}
|
package {{.pkgName}}
|
||||||
|
|
|
@ -875,7 +875,7 @@ func writeGo(outdir string, device *Device, interruptSystem string) error {
|
||||||
}).Parse(`// Automatically generated file. DO NOT EDIT.
|
}).Parse(`// Automatically generated file. DO NOT EDIT.
|
||||||
// Generated by gen-device-svd.go from {{.device.Metadata.File}}, see {{.device.Metadata.DescriptorSource}}
|
// 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}}
|
// {{.device.Metadata.Description}}
|
||||||
//
|
//
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче