How can I compile a Go program?
You're using 8c, which is the c compiler. 8g will compile go, and 8l will link.
(Update for Go1.0.x)
The section "Compile packages and dependencies" now list go build as the way to compile in go.
You still call 8g
behind the scene, and the parameters you could pass to 8g
are now passed with -gcflags
.
-gcflags 'arg list'
arguments to pass on each 5g, 6g, or 8g compiler invocation
For Go 1.0+ the correct build command is now: go build