Skip to content

Latest commit

 

History

History
10 lines (8 loc) · 517 Bytes

build-flags.md

File metadata and controls

10 lines (8 loc) · 517 Bytes

Build flags

A handful of flags can be passed to go build. The currently supported ones are:

  • -v: prints the names of packages as they are compiled
  • -x: prints the build commands as compilation progresses
  • -race: enables data race detection (supported only on amd64, rest built without)
  • -tags='tag list': list of build tags to consider satisfied during the build
  • -ldflags='flag list': arguments to pass on each go tool link invocation
  • -buildmode=mode: binary type to produce by the compiler