Wrapper: Remove unneeded '-fcolor-diagnostics'

There is something wrong with the pre-built binaries from llvm.org.
Colored warnings still work properly when building Clang/LLVM from source.
This commit is contained in:
Thomas Pöchtrager 2016-03-29 20:20:11 +02:00
parent e3e3cfb83e
commit ec95acda33
3 changed files with 2 additions and 16 deletions

View File

@ -183,11 +183,6 @@ bool runprog(Target &target, const char *, const char *progname, char **cargs) {
(*prog)(args.size() - 1, args.data(), target);
}
bool colordiagnostics(Target &target, const char *opt, const char *, char **) {
target.colordiagnostics = !strcmp(opt, "-fcolor-diagnostics");
return true;
}
bool liblto(Target &target, const char *opt, const char *, char **) {
target.wliblto = !strcmp(opt, "-Wliblto");
return true;
@ -257,8 +252,6 @@ constexpr struct Opt {
{"-x", language, true, true},
{"-foc-use-gcc-libstdc++", usegcclibstdcxx},
{"-foc-run-prog", runprog, true, false, "="}, // for internal use only
{"-fcolor-diagnostics", colordiagnostics, false, true},
{"-fno-color-diagnostics", colordiagnostics, false, true},
{"-Wliblto", liblto, false, true},
{"-Wno-liblto", liblto, false, true},
{"-isystem", checkincludepath, true, true},

View File

@ -43,8 +43,7 @@ namespace target {
Target::Target()
: vendor(getDefaultVendor()), SDK(getenv("OSXCROSS_SDKROOT")),
arch(Arch::x86_64), target(getDefaultTarget()), stdlib(StdLib::unset),
usegcclibs(), colordiagnostics(-1), wliblto(-1),
compiler(getDefaultCompilerIdentifier()),
usegcclibs(), wliblto(-1), compiler(getDefaultCompilerIdentifier()),
compilername(getDefaultCompilerName()), language() {
if (!getExecutablePath(execpath, sizeof(execpath)))
abort();
@ -786,7 +785,7 @@ bool Target::setup() {
}
}
if (clangversion >= ClangVersion(3, 8)) {
if (isClang() && clangversion >= ClangVersion(3, 8)) {
//
// Silence:
// warning: libLTO.dylib relative to clang installed dir not found;
@ -797,11 +796,6 @@ bool Target::setup() {
//
if (wliblto == -1)
fargs.push_back("-Wno-liblto");
//
// Get back color diagnostics.
//
if (colordiagnostics == -1)
fargs.push_back("-fcolor-diagnostics");
}
return true;

View File

@ -138,7 +138,6 @@ struct Target {
ClangVersion clangversion;
GCCVersion gccversion;
bool usegcclibs;
int colordiagnostics;
int wliblto;
Compiler compiler;
std::string compilerpath; // /usr/bin/clang | [...]/target/bin/*-gcc