1
0
mirror of https://github.com/golang/go synced 2024-10-04 02:31:22 -06:00

cmd/dist, cmd/go: pass -fmessage-length=0 when using clang

That option turns off word wrapping of individual
error messages generated by clang. The wrapping
makes the errors harder to read and conflicts with the
idea of a terminal window that can be resized.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/35810043
This commit is contained in:
Russ Cox 2013-12-09 10:33:27 -05:00
parent b9bed39714
commit 79479ac486
2 changed files with 4 additions and 0 deletions

View File

@ -677,6 +677,8 @@ install(char *dir)
vadd(&gccargs, "-fno-caret-diagnostics"); vadd(&gccargs, "-fno-caret-diagnostics");
// clang is too smart about unused command-line arguments // clang is too smart about unused command-line arguments
vadd(&gccargs, "-Qunused-arguments"); vadd(&gccargs, "-Qunused-arguments");
// disable line wrapping in error messages
vadd(&gccargs, "-fmessage-length=0");
} }
if(streq(gohostos, "darwin")) { if(streq(gohostos, "darwin")) {
// golang.org/issue/5261 // golang.org/issue/5261

View File

@ -1890,6 +1890,8 @@ func (b *builder) ccompilerCmd(envvar, defcmd, objdir string) []string {
a = append(a, "-fno-caret-diagnostics") a = append(a, "-fno-caret-diagnostics")
// clang is too smart about command-line arguments // clang is too smart about command-line arguments
a = append(a, "-Qunused-arguments") a = append(a, "-Qunused-arguments")
// disable word wrapping in error messages
a = append(a, "-fmessage-length=0")
} }
// On OS X, some of the compilers behave as if -fno-common // On OS X, some of the compilers behave as if -fno-common