mirror of
https://github.com/golang/go
synced 2024-11-22 04:44:39 -07:00
cmd/{go,cover}: enable response file args for cmd/cover
Change the cover command to accept arguments via response files, using the same mechanism employed for the compiler and the assembler. This is needed now that the cover tool accepts a list of all source files in a package, as opposed to just a single source file, and as a result can run into system-dependent command line length limits. Fixes #60785. Change-Id: I67dbc96ad9fc5c6f43d5c1e4e903e4b8589b154f Reviewed-on: https://go-review.googlesource.com/c/go/+/503735 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Than McIntosh <thanm@google.com>
This commit is contained in:
parent
3479e1e543
commit
51885c1fa2
@ -95,7 +95,7 @@ const (
|
||||
func main() {
|
||||
objabi.AddVersionFlag()
|
||||
flag.Usage = usage
|
||||
flag.Parse()
|
||||
objabi.Flagparse(usage)
|
||||
|
||||
// Usage information when no arguments.
|
||||
if flag.NFlag() == 0 && flag.NArg() == 0 {
|
||||
|
@ -3886,7 +3886,7 @@ func useResponseFile(path string, argLen int) bool {
|
||||
// TODO: Note that other toolchains like CC are missing here for now.
|
||||
prog := strings.TrimSuffix(filepath.Base(path), ".exe")
|
||||
switch prog {
|
||||
case "compile", "link", "cgo", "asm":
|
||||
case "compile", "link", "cgo", "asm", "cover":
|
||||
default:
|
||||
return false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user