diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2010-10-11 02:28:42 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2010-10-11 02:28:42 +0000 |
commit | 24da18f7285cc7601dbe467f466e2e04fa9eef6b (patch) | |
tree | eff5106c1c5194b46ead55974f5b3f8dfb194e76 /lib/Driver/Driver.cpp | |
parent | 32df002017e3e8d86bfd3f7090b341d265676fc9 (diff) |
lib/Driver/Driver.cpp: Use the driver g++-4 for Cygwin-1.5.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116183 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r-- | lib/Driver/Driver.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 0555342bc8..b32dac0b88 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -37,6 +37,13 @@ #include <map> +#ifdef __CYGWIN__ +#include <cygwin/version.h> +#if defined(CYGWIN_VERSION_DLL_MAJOR) && CYGWIN_VERSION_DLL_MAJOR<1007 +#define IS_CYGWIN15 1 +#endif +#endif + using namespace clang::driver; using namespace clang; @@ -225,8 +232,13 @@ Compilation *Driver::BuildCompilation(int argc, const char **argv) { CCCPrintActions = Args->hasArg(options::OPT_ccc_print_phases); CCCPrintBindings = Args->hasArg(options::OPT_ccc_print_bindings); CCCIsCXX = Args->hasArg(options::OPT_ccc_cxx) || CCCIsCXX; - if (CCCIsCXX) + if (CCCIsCXX) { +#ifdef IS_CYGWIN15 + CCCGenericGCCName = "g++-4"; +#else CCCGenericGCCName = "g++"; +#endif + } CCCEcho = Args->hasArg(options::OPT_ccc_echo); if (const Arg *A = Args->getLastArg(options::OPT_ccc_gcc_name)) CCCGenericGCCName = A->getValue(*Args); |