runtime: code generation confusion #34841
Closed
Labels
Comments
/cc @tklauser |
This discussion is probably better suited to the golang-dev list. |
The code generation steps in the runtime package have been broken since the runtime was converted from C to Go. Since the files rarely change, nobody has cared enough to fix this. This is a dup of #23341. See the discussion there. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am hacking on the runtime. In the process, I wanted to add a constant such that it ends up in the (apparently machine-generated)
defs_linux_$GOARCH.go
files. I'm confused about whether or not I should be editing these files by hand. There appears to be a code generation step described indefs_linux.go
, but I couldn't get it to work. Ago tool cgo -cdefs
does not appear to exist anymore.go tool cgo -godefs
does seem to exist, but that one chokes (among other things), on this line, which cannot possibly be right.If I fix that, I get a missing definition error for
C.MAP_PRIVATE
, which appears to be inlinux/mman.h
these days rather thanasm/mman.h
? (at least on my system, which isDebian GNU/Linux bullseye/sid
, according tolsb_release
)Do these comments need an update? Am I doing something wrong or missing a detail? When 77f9b27 was written, was the code generation tool actually invoked?
Thanks.
The text was updated successfully, but these errors were encountered: