//
// -asmflags '[pattern=]arg list'
// arguments to pass on each go tool asm invocation.
-// -buildinfo
-// Whether to stamp binaries with build flags. By default, the compiler name
-// (gc or gccgo), toolchain flags (like -gcflags), and environment variables
-// containing flags (like CGO_CFLAGS) are stamped into binaries. Use
-// -buildinfo=false to omit build information. See also -buildvcs.
// -buildmode mode
// build mode to use. See 'go help buildmode' for more.
// -buildvcs
// version control information is stamped into a binary if the main package
// and the main module containing it are in the repository containing the
// current directory (if there is a repository). Use -buildvcs=false to
-// omit version control information. See also -buildinfo.
+// omit version control information.
// -compiler name
// name of compiler to use, as in runtime.Compiler (gccgo or gc).
// -gccgoflags '[pattern=]arg list'
for buf.Len() < sys.ExecArgLengthLimit+1 {
buf.WriteString(testStr)
}
- tg.run("run", "-buildinfo=false", "-ldflags", fmt.Sprintf(`-X "main.extern=%s"`, buf.String()), tg.path("main.go"))
+ tg.run("run", "-ldflags", fmt.Sprintf(`-X "main.extern=%s"`, buf.String()), tg.path("main.go"))
if tg.stderr.String() != buf.String() {
t.Errorf("strings differ")
}
// These are general "build flags" used by build and other commands.
var (
BuildA bool // -a flag
- BuildBuildinfo bool // -buildinfo flag
BuildBuildmode string // -buildmode flag
BuildBuildvcs bool // -buildvcs flag
BuildContext = defaultContext()
// Add command-line flags relevant to the build.
// This is informational, not an exhaustive list.
// Please keep the list sorted.
- if cfg.BuildBuildinfo && !p.Standard {
+ if !p.Standard {
if cfg.BuildASan {
appendSetting("-asan", "true")
}
-asmflags '[pattern=]arg list'
arguments to pass on each go tool asm invocation.
- -buildinfo
- Whether to stamp binaries with build flags. By default, the compiler name
- (gc or gccgo), toolchain flags (like -gcflags), and environment variables
- containing flags (like CGO_CFLAGS) are stamped into binaries. Use
- -buildinfo=false to omit build information. See also -buildvcs.
-buildmode mode
build mode to use. See 'go help buildmode' for more.
-buildvcs
version control information is stamped into a binary if the main package
and the main module containing it are in the repository containing the
current directory (if there is a repository). Use -buildvcs=false to
- omit version control information. See also -buildinfo.
+ omit version control information.
-compiler name
name of compiler to use, as in runtime.Compiler (gccgo or gc).
-gccgoflags '[pattern=]arg list'
cmd.Flag.Var((*base.StringsFlag)(&cfg.BuildToolexec), "toolexec", "")
cmd.Flag.BoolVar(&cfg.BuildTrimpath, "trimpath", false, "")
cmd.Flag.BoolVar(&cfg.BuildWork, "work", false, "")
- cmd.Flag.BoolVar(&cfg.BuildBuildinfo, "buildinfo", true, "")
cmd.Flag.BoolVar(&cfg.BuildBuildvcs, "buildvcs", true, "")
// Undocumented, unstable debugging flags.