]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist, cmd/go: pass -fmessage-length=0 when using clang
authorRuss Cox <rsc@golang.org>
Mon, 9 Dec 2013 15:33:27 +0000 (10:33 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 9 Dec 2013 15:33:27 +0000 (10:33 -0500)
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

src/cmd/dist/build.c
src/cmd/go/build.go

index 69e2aafad9bac44fbb653c3f23d7bb9e7a402a61..c70d5798db414b08ce421c3beaaec1c9537f6191 100644 (file)
@@ -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
index f70f778d942d6c8bebc139422e9d2d08e548a370..7d6913662cbcd06c87c8637e47b1c58eef51fa08 100644 (file)
@@ -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