remove the use of -buildinfo=false

It looks like the flag will be scrapped from Go 1.18.
Stop using it before 1.18rc1 releases without it.

See: https://github.com/golang/go/issues/50501#issuecomment-1010225207
pull/460/head
Daniel Martí 3 years ago committed by lu4p
parent 716f007c2a
commit 321fa85441

@ -499,10 +499,7 @@ This command wraps "go %s". Below is its help:
}
if semver.Compare(goVersionSemver, "v1.18.0") >= 0 {
// TODO: remove the conditional once we drop support for 1.17
goArgs = append(goArgs,
"-buildinfo=false",
"-buildvcs=false",
)
goArgs = append(goArgs, "-buildvcs=false")
}
goArgs = append(goArgs, toolexecFlag.String())
if flagDebugDir != "" {
@ -1821,10 +1818,9 @@ var forwardBuildFlags = map[string]bool{
"-v": false,
// These are always set by garble.
"-trimpath": false,
"-toolexec": false,
"-buildinfo": false,
"-buildvcs": false,
"-trimpath": false,
"-toolexec": false,
"-buildvcs": false,
"-p": true,
"-race": true,
@ -1862,7 +1858,6 @@ var booleanFlags = map[string]bool{
"-linkshared": true,
"-modcacherw": true,
"-trimpath": true,
"-buildinfo": true,
"-buildvcs": true,
// Test flags (TODO: support its special -args flag)

@ -163,7 +163,7 @@ func (p *listedPackage) obfuscatedImportPath() string {
func appendListedPackages(patterns ...string) error {
startTime := time.Now()
// TODO: perhaps include all top-level build flags set by garble,
// including -buildinfo=false and -buildvcs=false.
// including -buildvcs=false.
// They shouldn't affect "go list" here, but might as well be consistent.
args := []string{"list", "-json", "-deps", "-export", "-trimpath"}
args = append(args, cache.ForwardBuildFlags...)

Loading…
Cancel
Save