Commit 79479ac4 authored by Russ Cox's avatar Russ Cox

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
parent b9bed397
......@@ -677,6 +677,8 @@ install(char *dir)
vadd(&gccargs, "-fno-caret-diagnostics");
// clang is too smart about unused command-line arguments
vadd(&gccargs, "-Qunused-arguments");
// disable line wrapping in error messages
vadd(&gccargs, "-fmessage-length=0");
}
if(streq(gohostos, "darwin")) {
// golang.org/issue/5261
......
......@@ -1890,6 +1890,8 @@ func (b *builder) ccompilerCmd(envvar, defcmd, objdir string) []string {
a = append(a, "-fno-caret-diagnostics")
// clang is too smart about command-line 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment