Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove the use of -buildinfo=false #458

Merged
merged 1 commit into from
Jan 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 4 additions & 9 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 != "" {
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
Expand Down