-n | Print the commands but do not run them |
-v | Print the names of packages as they are compiled |
-x | Print the commands |
-tags <tags> | A comma-separated list of build tags to consider satisfied during the build |
-toolexec <cmd> | A program to use to invoke toolchain programs like vet and asm |
-a | Force rebuilding of packages that are already up-to-date |
-p <programs> | The number of programs, such as build commands or |
-race | Enable data race detection.
Supported only on linux/amd64, freebsd/amd64, darwin/amd64, windows/amd64,
linux/ppc64le and linux/arm64 (only for 48-bit VMA) |
-msan | Enable interoperation with memory sanitizer.
Supported only on linux/amd64, linux/arm64
and only with Clang/LLVM as the host C compiler.
On linux/arm64, pie build mode will be used |
-work | Print the name of the temporary work directory and
do not delete it when exiting |
-asmflags <flag...> | Arguments to pass on each go tool asm invocation |
-buildmode <mode> | Build mode to use. See 'go help buildmode' for more |
-compiler <name> | Name of compiler to use, as in runtime.Compiler (gccgo or gc) |
-gccgoflags <flag...> | Arguments to pass on each gccgo compiler/linker invocation |
-gcflags <flag...> | Arguments to pass on each go tool compile invocation |
-installsuffix <suffix> | A suffix to use in the name of the package installation directory, |
-ldflags <flag...> | Arguments to pass on each go tool link invocation |
-linkshared | Build code that will be linked against shared libraries previously |
-mod <mode> | Module download mode to use: readonly, vendor, or mod |
-modcacherw | Leave newly-created directories in the module cache read-write |
-modfile <file> | In module aware mode, read (and possibly write) an alternate go.mod file instead of the one in the module root directory |
-overlay <file> | Read a JSON config file that provides an overlay for build operations |
-pkgdir <dir> | Install and load all packages from dir instead of the usual locations |
-trimpath | Remove all file system paths from the resulting executable |
-compiled | Set CompiledGoFiles to the Go source files |
-deps | Terate over not just the named packages but also all their dependencies |
-f <format> | Specify an alternate format for the list |
-e | Processes the erroneous packages with the usual printing |
-export | Set the Export field to the name of a file containing up-to-date export information for the given package |
-find | Identify the named packages but not resolve their dependencies |
-test | Report test binaries |
-m | List modules instead of packages |
-u | Add information about available upgrades |
-versions | Set the Module's Versions field to a list of all known versions of that module |
-retracted | Eport information about retracted module versions |