Home > Software engineering >  What is the difference between "compile" and "build" in Go? [duplicate]
What is the difference between "compile" and "build" in Go? [duplicate]

Time:10-07

What is the accurate difference between "compile" and "build" in Golang?

CodePudding user response:

The go command internally calls an internal tool called compile which produces so-called "object files" from the source code files. It then calls the internal tool called link which takes those object code files and produces a final executable image file or a package—depending on what is being built.

I think you should start with this, then this and then run the go build command passing it the -x command-line parameter, making it verbosely print what is does.

  •  Tags:  
  • go
  • Related