Grokking Advanced Go
0% completed
Build Tags and Cross Compilation
The Go 1.27 toolchain on one machine can build programs for 47 targets, and a target is a pair of an operating system and a processor architecture. The command go tool dist list prints all of them. The list covers 15 operating systems, and the same list marks 8 pairs as first class, which means that the Go project treats a failure on one of them as blocking a release.
Building for a target other than the current machine is called cross compilation. In Go, it needs no extra compiler for pure Go code (code that does not call C)
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%