Horrible hack for systems that use -dumpversion with clang to expect versions

that match gcc versions. Eew.

llvm-svn: 122080
This commit is contained in:
Eric Christopher 2010-12-17 19:13:21 +00:00
parent 6cb5810a75
commit 4698e938b1
2 changed files with 8 additions and 1 deletions

View File

@ -40,6 +40,10 @@
CLANG_MAKE_VERSION_STRING(CLANG_VERSION_MAJOR,CLANG_VERSION_MINOR)
#endif
/// \brief A horrible hack to work around projects that depend upon gcc
/// compatible compilers having versions that resemble gcc.
#define GCC_COMPAT_VERSION_STRING CLANG_MAKE_VERSION_STRING(4,2)
namespace clang {
/// \brief Retrieves the repository path (e.g., Subversion path) that
/// identifies the particular Clang branch, tag, or trunk from which this

View File

@ -417,8 +417,11 @@ bool Driver::HandleImmediateArgs(const Compilation &C) {
return false;
}
// This is a horrible hack. Some projects depend on gcc-like versions
// coming out of gcc -dumpversion to determine if the gcc compatible
// compiler has a correct version. Ideally we'd fix all of those projects.
if (C.getArgs().hasArg(options::OPT_dumpversion)) {
llvm::outs() << CLANG_VERSION_STRING "\n";
llvm::outs() << GCC_COMPAT_VERSION_STRING "\n";
return false;
}