This does not change the default compiler on OS X to clang.
It appears that for now we can keep using gcc as long as we
enable a few more warning settings that are on-by-default
elsewhere.
R=golang-dev, bradfitz, dave
CC=golang-dev
https://golang.org/cl/
11610044
// native Plan 9 compilers don't like non-standard prototypes
// so let gcc catch them.
"-Wstrict-prototypes",
+ "-Wextra",
+ "-Wunused",
+ "-Wuninitialized",
"-Wno-sign-compare",
"-Wno-missing-braces",
"-Wno-parentheses",
"-Wno-unknown-pragmas",
"-Wno-switch",
"-Wno-comment",
+ "-Wno-missing-field-initializers",
"-Werror",
"-fno-common",
"-ggdb",
for(i=0; i<nelem(proto_gccargs); i++)
vadd(&gccargs, proto_gccargs[i]);
if(clang) {
+ // disable ASCII art in clang errors, if possible
+ vadd(&gccargs, "-fno-caret-diagnostics");
// clang is too smart about unused command-line arguments
vadd(&gccargs, "-Qunused-arguments");
}
setvbuf(stdout, nil, _IOLBF, 0);
setvbuf(stderr, nil, _IOLBF, 0);
+ setenv("TERM", "dumb", 1); // disable escape codes in clang errors
+
binit(&b);
slash = "/";
}
}
- // clang is too smart about command-line arguments
if strings.Contains(a[0], "clang") {
+ // disable ASCII art in clang errors, if possible
+ a = append(a, "-fno-caret-diagnostics")
+ // clang is too smart about command-line arguments
a = append(a, "-Qunused-arguments")
}
{"GORACE", os.Getenv("GORACE")},
{"GOROOT", goroot},
{"GOTOOLDIR", toolDir},
+
+ // disable escape codes in clang errors
+ {"TERM", "dumb"},
}
if goos != "plan9" {