Allow adding build tags to generated Go assembly files
dgryski opened this issue · 5 comments
Build tags allow toggling (for example) between a pure Go implementation of a routine and the optimized assembly one.
At the moment I have to add these by hand to the generated assembly and I frequently forget. It would be nice if I could put directives in the peachpy file and have it add the appropriate comments.
I think if you name the file <anything>_amd64.s
, it will build only for x86-64. Do you need some other build restrictions?
It's common to have a noasm
tag that builds the Go version instead. This leads to duplicate symbol definitions if the assembly file is included because of the filename.
Ok, so what should I add to generated Golang assembly listings?
WIth f8e549a, I implemented generation of // +build !noasm
tag like you use in dgryski/go-groupvarint. Let me know if something else is needed.