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>
func main() {
objabi.AddVersionFlag()
flag.Usage = usage
- flag.Parse()
+ objabi.Flagparse(usage)
// Usage information when no arguments.
if flag.NFlag() == 0 && flag.NArg() == 0 {
// 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
}