mirror of
https://github.com/Relintai/osxcross.git
synced 2025-02-03 22:45:56 +01:00
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:
parent
e3e3cfb83e
commit
ec95acda33
@ -183,11 +183,6 @@ bool runprog(Target &target, const char *, const char *progname, char **cargs) {
|
|||||||
(*prog)(args.size() - 1, args.data(), target);
|
(*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 **) {
|
bool liblto(Target &target, const char *opt, const char *, char **) {
|
||||||
target.wliblto = !strcmp(opt, "-Wliblto");
|
target.wliblto = !strcmp(opt, "-Wliblto");
|
||||||
return true;
|
return true;
|
||||||
@ -257,8 +252,6 @@ constexpr struct Opt {
|
|||||||
{"-x", language, true, true},
|
{"-x", language, true, true},
|
||||||
{"-foc-use-gcc-libstdc++", usegcclibstdcxx},
|
{"-foc-use-gcc-libstdc++", usegcclibstdcxx},
|
||||||
{"-foc-run-prog", runprog, true, false, "="}, // for internal use only
|
{"-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},
|
{"-Wliblto", liblto, false, true},
|
||||||
{"-Wno-liblto", liblto, false, true},
|
{"-Wno-liblto", liblto, false, true},
|
||||||
{"-isystem", checkincludepath, true, true},
|
{"-isystem", checkincludepath, true, true},
|
||||||
|
@ -43,8 +43,7 @@ namespace target {
|
|||||||
Target::Target()
|
Target::Target()
|
||||||
: vendor(getDefaultVendor()), SDK(getenv("OSXCROSS_SDKROOT")),
|
: vendor(getDefaultVendor()), SDK(getenv("OSXCROSS_SDKROOT")),
|
||||||
arch(Arch::x86_64), target(getDefaultTarget()), stdlib(StdLib::unset),
|
arch(Arch::x86_64), target(getDefaultTarget()), stdlib(StdLib::unset),
|
||||||
usegcclibs(), colordiagnostics(-1), wliblto(-1),
|
usegcclibs(), wliblto(-1), compiler(getDefaultCompilerIdentifier()),
|
||||||
compiler(getDefaultCompilerIdentifier()),
|
|
||||||
compilername(getDefaultCompilerName()), language() {
|
compilername(getDefaultCompilerName()), language() {
|
||||||
if (!getExecutablePath(execpath, sizeof(execpath)))
|
if (!getExecutablePath(execpath, sizeof(execpath)))
|
||||||
abort();
|
abort();
|
||||||
@ -786,7 +785,7 @@ bool Target::setup() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clangversion >= ClangVersion(3, 8)) {
|
if (isClang() && clangversion >= ClangVersion(3, 8)) {
|
||||||
//
|
//
|
||||||
// Silence:
|
// Silence:
|
||||||
// warning: libLTO.dylib relative to clang installed dir not found;
|
// warning: libLTO.dylib relative to clang installed dir not found;
|
||||||
@ -797,11 +796,6 @@ bool Target::setup() {
|
|||||||
//
|
//
|
||||||
if (wliblto == -1)
|
if (wliblto == -1)
|
||||||
fargs.push_back("-Wno-liblto");
|
fargs.push_back("-Wno-liblto");
|
||||||
//
|
|
||||||
// Get back color diagnostics.
|
|
||||||
//
|
|
||||||
if (colordiagnostics == -1)
|
|
||||||
fargs.push_back("-fcolor-diagnostics");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -138,7 +138,6 @@ struct Target {
|
|||||||
ClangVersion clangversion;
|
ClangVersion clangversion;
|
||||||
GCCVersion gccversion;
|
GCCVersion gccversion;
|
||||||
bool usegcclibs;
|
bool usegcclibs;
|
||||||
int colordiagnostics;
|
|
||||||
int wliblto;
|
int wliblto;
|
||||||
Compiler compiler;
|
Compiler compiler;
|
||||||
std::string compilerpath; // /usr/bin/clang | [...]/target/bin/*-gcc
|
std::string compilerpath; // /usr/bin/clang | [...]/target/bin/*-gcc
|
||||||
|
Loading…
Reference in New Issue
Block a user