<#12943 go: assembly may require generation of go_...
# github-notifications
q
#12943 go: assembly may require generation of go_asm.h file New issue created by tdyas Assembling Go assembly
.s
files may require generation of a
go_asm.h
with metadata from the
.go
files in the same package. See https://golang.org/doc/asm#data-offsets:
If a package has any .s files, then go build will direct the compiler to emit a special header called go_asm.h, which the .s files can then #include. The file contains symbolic #define constants for the offsets of Go struct fields, the sizes of Go struct types, and most Go const declarations defined in the current package. Go assembly should avoid making assumptions about the layout of Go types and instead use these constants. This improves the readability of assembly code, and keeps it robust to changes in data layout either in the Go type definitions or in the layout rules used by the Go compiler.
pantsbuild/pants