[cfe-dev] Clang and (cross-)compilation to [i686, x86_64]-w64-mingw32

Ruben Van Boxem vanboxem.ruben at gmail.com
Wed Jan 15 14:16:40 PST 2014


2014/1/14 Reid Kleckner <rnk at google.com>

> On Sun, Jan 12, 2014 at 3:20 AM, Ruben Van Boxem <vanboxem.ruben at gmail.com
> > wrote:
>
>> Hi,
>>
>> I'm planning to take a much-needed look at MinGW(-w64) compatibility in
>> the Clang driver. What I'm hoping to accomplish is the following:
>> 1. allow 'clang -target [i686,x86_64]-w64-mingw32' to:
>> 1a) search /usr/[i686,x86_64]-w64-mingw32/[include,lib] and certain
>> subdirectories for C(++) headers and libraries,
>> 1b) use [i686,x86_64]-w64-mingw32-[as,ld,...] instead of what is
>> currently (as of Clang 3.3 in my Arch Linux installation, will soon test a
>> top of trunk build) [as,ld,...]
>> 1c) set the necessary libraries to link in various situations.
>> 2) Build a toolchain:
>> 2a) that uses GNU binutils, Clang, and GNU libgcc/libstdc++ and make it
>> work.
>> 2b) that uses GNU binutils, Clang, LLVM compiler-rt, and GNU libstdc++
>> and make it work.
>>
>
> Sounds good!
>
>
>> For this, I'd like to introduce a new Toolchain subclass, MinGWToolchain,
>> which takes care of the *-*-mingw32 triplets.
>>
>> I'm unsure of several things:
>> 1) where is the target triple "converted" into a Toolchain instance?
>>
>
> Driver::getToolChain() in Driver.cpp
>

>
>>  2) how can I pass triplet-specific include dirs at configure/cmake
>> time? This would not really be necessary, but actually really is if Clang
>> is to be used as an "ultra-cross"-compiler targetting every triplet under
>> the sun from one binary (which is an awesome idea).
>>
>
> I'm not sure exactly what the question is.
>

I was talking about the --with-c-include-dirs and associated configure
options. But I now believe my MinGWToolChain and related work will include
these settings hardcoded in the driver, which is much better. So forget
this question :-)


>
>> I have read the sparse Driver documentation, and unfortunately not found
>> an answer to the above issues. I would appreciate any substantial help
>> anyone can give me in these departments. I'd like to do this right so the
>> changes can stay (unlike my previous InitHeaderSearch hacks)
>>
>
> We have driver documentation?  I wasn't aware of it.  :)  I'd look at
> clang/test/Driver for some of the existing header / library search tests.
>

OK, thanks. I'll be sure to take a look there.

Attached is a *preliminary* patch adding MinGW-w64 driver support. This
includes:
 - C(++) system include directories
 - C(++) system libraries
 - basic "Hello World" C and C++ test compiles and links on Arch Linux with
the mingw-w64-gcc toolchain packages installed. Clang now calls the cross
binutils directly instead of linking with cross gcc.

This patch is missing:
 - more than basic testing (including a Windows native Clang, which will
take some manual installation steps)
 - dll import lib options,
 - MinGW(.org) search directories. I'll get to this once I solve the next
point;
 - Cross GCC version detection: I know the Generic_GCC ToolChain has
machinery to do this, but it also adds the /usr/include and
/usr/local/include directories, and probably some native library
directories which I really really don't want. Is there an easy way to get
at the cross GCC version at the ToolChain level?

Once I get the GCC version (which is hardcoded in attached patch), I'll fix
up the rest and this should be ready in no time!

Another question for later: how do I build the libgcc replacing part of
compiler-rt for a specific target? Is there CMake build machinery to build
a number of target libraries or do I need to build them separately and
manually (not really a problem, just need to know how)?

Cheers!

Ruben

PS: I'm not subscribed to cfe-dev, please CC me directly.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140115/e4739378/attachment.html>
-------------- next part --------------
diff --git a/lib/Driver/CMakeLists.txt b/lib/Driver/CMakeLists.txt
index e874ab8..71b7ec6 100644
--- a/lib/Driver/CMakeLists.txt
+++ b/lib/Driver/CMakeLists.txt
@@ -17,6 +17,7 @@ add_clang_library(clangDriver
   ToolChain.cpp
   ToolChains.cpp
   WindowsToolChain.cpp
+  MinGWToolChain.cpp
   Tools.cpp
   Types.cpp
   )
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 253a083..2f5239e 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -1971,7 +1971,8 @@ const ToolChain &Driver::getToolChain(const ArgList &Args,
       TC = new toolchains::Windows(*this, Target, Args);
       break;
     case llvm::Triple::MinGW32:
-      // FIXME: We need a MinGW toolchain. Fallthrough for now.
+      TC = new toolchains::MinGW(*this, Target, Args);
+      break;
     default:
       // TCE is an OSless target
       if (Target.getArchName() == "tce") {
diff --git a/lib/Driver/MinGWToolChain.cpp b/lib/Driver/MinGWToolChain.cpp
new file mode 100644
index 0000000..89f0747
--- /dev/null
+++ b/lib/Driver/MinGWToolChain.cpp
@@ -0,0 +1,144 @@
+//===--- ToolChains.cpp - ToolChain Implementations -----------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "ToolChains.h"
+#include "clang/Basic/CharInfo.h"
+#include "clang/Basic/Version.h"
+#include "clang/Driver/Compilation.h"
+#include "clang/Driver/Driver.h"
+#include "clang/Driver/DriverDiagnostic.h"
+#include "clang/Driver/Options.h"
+#include "llvm/Option/Arg.h"
+#include "llvm/Option/ArgList.h"
+#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/Path.h"
+
+using namespace clang::driver;
+using namespace clang::driver::toolchains;
+using namespace clang;
+using namespace llvm::opt;
+
+MinGW::MinGW(const Driver &D, const llvm::Triple& Triple,
+             const ArgList &Args)
+  : ToolChain(D, Triple, Args) {
+#ifdef _WIN32
+  // assume sysrooted compiler
+  getFilePaths().push_back(getDriver().SysRoot + "/lib");
+  getFilePaths().push_back(getDriver().SysRoot + "/"
+                           + getTriple().getTriple() + "/lib");
+  getFilePaths().push_back(getDriver().SysRoot + "/lib/gcc/"
+                           + getTriple().getTriple() + "/4.8.2"); //FIXME detect cross GCC version
+  //TODO: libc++ directory
+#else
+  // assume install prefix /usr
+  getFilePaths().push_back(getDriver().SysRoot + "/usr/"
+                           + getTriple().getTriple() + "/lib");
+  getFilePaths().push_back(getDriver().SysRoot + "/usr/lib/gcc/"
+                           + getTriple().getTriple() + "/4.8.2"); //FIXME detect cross GCC version
+  //TODO: libc++ directory
+#endif
+}
+
+Tool *MinGW::buildLinker() const {
+  return new tools::MinGW::Link(*this);
+}
+
+bool MinGW::IsIntegratedAssemblerDefault() const {
+  return false;
+}
+
+Tool *MinGW::buildAssembler() const {
+  return new tools::MinGW::Assemble(*this);
+}
+
+bool MinGW::IsUnwindTablesDefault() const {
+  return getArch() == llvm::Triple::x86_64;
+}
+
+bool MinGW::isPICDefault() const {
+  return getArch() == llvm::Triple::x86_64;
+}
+
+bool MinGW::isPIEDefault() const {
+  return false;
+}
+
+bool MinGW::isPICDefaultForced() const {
+  return getArch() == llvm::Triple::x86_64;
+}
+
+void MinGW::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
+                                      ArgStringList &CC1Args) const {
+  if (DriverArgs.hasArg(options::OPT_nostdinc))
+    return;
+
+  if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) {
+    SmallString<128> P(getDriver().ResourceDir);
+    llvm::sys::path::append(P, "include");
+    addSystemInclude(DriverArgs, CC1Args, P.str());
+  }
+
+  if (DriverArgs.hasArg(options::OPT_nostdlibinc))
+    return;
+
+#ifdef _WIN32
+  // Clang runs on Windows, assume sysroot toolchain
+  addSystemInclude(DriverArgs, CC1Args,
+                   getDriver().SysRoot + "/" + getTriple().getTriple() + "/include");
+#else
+  // Clang runs somewhere else, e.g. Linux, assume install prefix /usr
+  addSystemInclude(DriverArgs, CC1Args,
+                   getDriver().SysRoot + "/usr/" + getTriple().getTriple()
+                                       + "/include");
+#endif
+}
+
+void MinGW::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
+                                           ArgStringList &CC1Args) const {
+  if (DriverArgs.hasArg(options::OPT_nostdlibinc) ||
+      DriverArgs.hasArg(options::OPT_nostdincxx))
+    return;
+
+  // Check if libc++ has been enabled and provide its include paths if so.
+  if (GetCXXStdlibType(DriverArgs) == ToolChain::CST_Libcxx) {
+    // libc++ is always installed at a fixed path on Linux currently.
+    addSystemInclude(DriverArgs, CC1Args,
+                     getDriver().SysRoot + "/usr/include/c++/v1"); // FIXME for MinGW-w64
+    return;
+  }
+#ifdef _WIN32
+  addSystemInclude(DriverArgs, CC1Args,
+                   getDriver().SysRoot + "/include/c++/4.8.2"); //FIXME detect cross GCC version
+  addSystemInclude(DriverArgs, CC1Args,
+                   getDriver().SysRoot + "/include/c++/4.8.2/" //FIXME detect cross GCC version
+                   + getTriple().getTriple());
+  addSystemInclude(DriverArgs, CC1Args,
+                   getDriver().SysRoot + "/include/c++/4.8.2/backward"); //FIXME detect cross GCC version
+  addSystemInclude(DriverArgs, CC1Args,
+                   getDriver().SysRoot + "/include/c++/4.8.2/include"); //FIXME detect cross GCC version
+  addSystemInclude(DriverArgs, CC1Args,
+                   getDriver().SysRoot + "/include/c++/4.8.2/include-fixed"); //FIXME detect cross GCC version
+#else
+  addSystemInclude(DriverArgs, CC1Args,
+                   getDriver().SysRoot + "/usr/" + getTriple().getTriple()
+                   + "/include/c++/4.8.2"); //FIXME detect cross GCC version
+  addSystemInclude(DriverArgs, CC1Args,
+                   getDriver().SysRoot + "/usr/" + getTriple().getTriple()
+                   + "/include/c++/4.8.2/" + getTriple().getTriple()); //FIXME detect cross GCC version
+  addSystemInclude(DriverArgs, CC1Args,
+                   getDriver().SysRoot + "/usr/" + getTriple().getTriple()
+                   + "/include/c++/4.8.2/backward"); //FIXME detect cross GCC version
+  addSystemInclude(DriverArgs, CC1Args,
+                   getDriver().SysRoot + "/usr/" + getTriple().getTriple()
+                   + "/include/c++/4.8.2/include"); //FIXME detect cross GCC version
+  addSystemInclude(DriverArgs, CC1Args,
+                   getDriver().SysRoot + "/usr/" + getTriple().getTriple()
+                   + "/include/c++/4.8.2/include-fixed"); //FIXME detect cross GCC version
+#endif
+}
diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h
index d9edcca..b71b08a 100644
--- a/lib/Driver/ToolChains.h
+++ b/lib/Driver/ToolChains.h
@@ -671,6 +671,29 @@ protected:
   virtual Tool *buildAssembler() const;
 };
 
+class LLVM_LIBRARY_VISIBILITY MinGW : public ToolChain {
+public:
+  MinGW(const Driver &D, const llvm::Triple &Triple,
+        const llvm::opt::ArgList &Args);
+
+  virtual bool IsIntegratedAssemblerDefault() const;
+  virtual bool IsUnwindTablesDefault() const;
+  virtual bool isPICDefault() const;
+  virtual bool isPIEDefault() const;
+  virtual bool isPICDefaultForced() const;
+
+  virtual void
+  AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
+                            llvm::opt::ArgStringList &CC1Args) const;
+  virtual void
+  AddClangCXXStdlibIncludeArgs(const llvm::opt::ArgList &DriverArgs,
+                               llvm::opt::ArgStringList &CC1Args) const;
+
+protected:
+  virtual Tool *buildLinker() const;
+  virtual Tool *buildAssembler() const;
+};
+
 
 class LLVM_LIBRARY_VISIBILITY XCore : public ToolChain {
 public:
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 5689d1c..eb99ea8 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -7137,6 +7137,161 @@ Command *visualstudio::Compile::GetCommand(Compilation &C, const JobAction &JA,
   return new Command(JA, *this, Args.MakeArgString(Exec), CmdArgs);
 }
 
+/// MinGW Tools
+void MinGW::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
+                                   const InputInfo &Output,
+                                   const InputInfoList &Inputs,
+                                   const ArgList &Args,
+                                   const char *LinkingOutput) const {
+  ArgStringList CmdArgs;
+
+  if (getToolChain().getArch() == llvm::Triple::x86) {
+    CmdArgs.push_back("--32");
+  } else if (getToolChain().getArch() == llvm::Triple::x86_64) {
+    CmdArgs.push_back("--64");
+  }
+
+  Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
+                       options::OPT_Xassembler);
+
+  CmdArgs.push_back("-o");
+  CmdArgs.push_back(Output.getFilename());
+
+  for (InputInfoList::const_iterator
+         it = Inputs.begin(), ie = Inputs.end(); it != ie; ++it) {
+    const InputInfo &II = *it;
+    CmdArgs.push_back(II.getFilename());
+  }
+
+  const char *Exec =
+    Args.MakeArgString(getToolChain().GetProgramPath("as"));
+  C.addCommand(new Command(JA, *this, Exec, CmdArgs));
+}
+
+#include <iostream>
+void MinGW::Link::ConstructJob(Compilation &C, const JobAction &JA,
+                               const InputInfo &Output,
+                               const InputInfoList &Inputs,
+                               const ArgList &Args,
+                               const char *LinkingOutput) const {
+  const ToolChain &TC = getToolChain();
+  const Driver &D = TC.getDriver();
+  //const SanitizerArgs &Sanitize = TC.getSanitizerArgs();
+
+  ArgStringList CmdArgs;
+
+  // Silence warning for "clang -g foo.o -o foo"
+  Args.ClaimAllArgs(options::OPT_g_Group);
+  // and "clang -emit-llvm foo.o -o foo"
+  Args.ClaimAllArgs(options::OPT_emit_llvm);
+  // and for "clang -w foo.o -o foo". Other warning options are already
+  // handled somewhere else.
+  Args.ClaimAllArgs(options::OPT_w);
+
+  if (!D.SysRoot.empty())
+    CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot));
+
+  if (Args.hasArg(options::OPT_s))
+    CmdArgs.push_back("-s");
+
+  CmdArgs.push_back("-m");
+  if (TC.getArch() == llvm::Triple::x86)
+    CmdArgs.push_back("i386pe");
+  if (TC.getArch() == llvm::Triple::x86_64)
+    CmdArgs.push_back("i386pep");
+
+  if (Args.hasArg(options::OPT_static))
+    CmdArgs.push_back("-Bstatic");
+  else {
+    CmdArgs.push_back("-Bdynamic");
+    // -shared means building DLL
+    if (Args.hasArg(options::OPT_shared)) {
+      CmdArgs.push_back("--shared");
+      CmdArgs.push_back("-e DllMainCRTStartup");
+      CmdArgs.push_back("--enable-auto-image-base");
+      //TODO: implib options
+    }
+  }
+
+  CmdArgs.push_back("-o");
+  CmdArgs.push_back(Output.getFilename());
+
+  if (!Args.hasArg(options::OPT_nostdlib) &&
+      !Args.hasArg(options::OPT_nostartfiles)) {
+    CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath("crt2.o")));
+    CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath("crtbegin.o")));
+  }
+
+  Args.AddAllArgs(CmdArgs, options::OPT_L);
+
+  const ToolChain::path_list Paths = TC.getFilePaths();
+
+  std::cout << "\n\n";
+  for(auto path : Paths)
+    std::cout << path << '\n';
+  std::cout << "\n\n";
+
+  for (ToolChain::path_list::const_iterator i = Paths.begin(), e = Paths.end();
+       i != e; ++i)
+    CmdArgs.push_back(Args.MakeArgString(StringRef("-L") + *i));
+
+  AddLinkerInputs(TC, Inputs, Args, CmdArgs);
+
+  //TODO: Add ASan stuff here
+
+  //TODO: Add profile stuff here
+
+  if (D.CCCIsCXX() &&
+      !Args.hasArg(options::OPT_nostdlib) &&
+      !Args.hasArg(options::OPT_nodefaultlibs)) {
+    bool OnlyLibstdcxxStatic = Args.hasArg(options::OPT_static_libstdcxx) &&
+      !Args.hasArg(options::OPT_static);
+    if (OnlyLibstdcxxStatic)
+      CmdArgs.push_back("-Bstatic");
+    TC.AddCXXStdlibLibArgs(Args, CmdArgs);
+    if (OnlyLibstdcxxStatic)
+      CmdArgs.push_back("-Bdynamic");
+  }
+
+  if (!Args.hasArg(options::OPT_nostdlib)) {
+    if (!Args.hasArg(options::OPT_nodefaultlibs)) {
+      CmdArgs.push_back("--start-group");
+
+      if (Args.hasArg(options::OPT_fopenmp))
+        CmdArgs.push_back("-lgomp");
+
+      AddLibgcc(TC.getTriple(), D, CmdArgs, Args);
+
+      //TODO: remove unconditionally linking pthreads library
+      // Currently required for OpenMP and posix-threading libgcc
+      CmdArgs.push_back("-lpthread");
+
+      // add system libraries
+      // TODO: handle msvcr*.dll versions here.
+      CmdArgs.push_back("-lmingw32");
+      CmdArgs.push_back("-lmoldname");
+      CmdArgs.push_back("-lmingwex");
+      CmdArgs.push_back("-lmsvcrt");
+      CmdArgs.push_back("-ladvapi32");
+      CmdArgs.push_back("-lshell32");
+      CmdArgs.push_back("-luser32");
+      CmdArgs.push_back("-lkernel32");
+
+      CmdArgs.push_back("--end-group");
+      AddLibgcc(TC.getTriple(), D, CmdArgs, Args);
+    }
+
+    if (!Args.hasArg(options::OPT_nostartfiles)) {
+      // Add crtfastmath.o if available and fast math is enabled.
+      getToolChain().AddFastMathRuntimeIfAvailable(Args, CmdArgs);
+
+      CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath("crtend.o")));
+    }
+  }
+  const char *Exec =
+          Args.MakeArgString(TC.GetProgramPath("ld"));
+  C.addCommand(new Command(JA, *this, Exec, CmdArgs));
+}
 
 /// XCore Tools
 // We pass assemble and link construction to the xcc tool.
diff --git a/lib/Driver/Tools.h b/lib/Driver/Tools.h
index 2ede62e..26fa8d3 100644
--- a/lib/Driver/Tools.h
+++ b/lib/Driver/Tools.h
@@ -613,6 +613,37 @@ namespace visualstudio {
   };
 } // end namespace visualstudio
 
+  /// MinGW -- Directly call GNU Binutils assembler and linker
+namespace MinGW {
+  class LLVM_LIBRARY_VISIBILITY Assemble : public Tool  {
+  public:
+    Assemble(const ToolChain &TC) : Tool("dragonfly::Assemble", "assembler",
+                                         TC) {}
+
+    virtual bool hasIntegratedCPP() const { return false; }
+
+    virtual void ConstructJob(Compilation &C, const JobAction &JA,
+                              const InputInfo &Output,
+                              const InputInfoList &Inputs,
+                              const llvm::opt::ArgList &TCArgs,
+                              const char *LinkingOutput) const;
+  };
+  class LLVM_LIBRARY_VISIBILITY Link : public Tool  {
+  public:
+    Link(const ToolChain &TC) : Tool("dragonfly::Link", "linker", TC) {}
+
+    virtual bool hasIntegratedCPP() const { return false; }
+    virtual bool isLinkJob() const { return true; }
+
+    virtual void ConstructJob(Compilation &C, const JobAction &JA,
+                              const InputInfo &Output,
+                              const InputInfoList &Inputs,
+                              const llvm::opt::ArgList &TCArgs,
+                              const char *LinkingOutput) const;
+  };
+} // end namespace MinGW
+
+
 namespace arm {
   StringRef getARMFloatABI(const Driver &D, const llvm::opt::ArgList &Args,
                          const llvm::Triple &Triple);
diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp
index bb1fe2d..2864bcf 100644
--- a/lib/Frontend/InitHeaderSearch.cpp
+++ b/lib/Frontend/InitHeaderSearch.cpp
@@ -311,7 +311,7 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
     AddPath("/usr/include/w32api", System, false);
     break;
   case llvm::Triple::MinGW32: { 
-      // mingw-w64 crt include paths
+      /*// mingw-w64 crt include paths
       // <sysroot>/i686-w64-mingw32/include
       SmallString<128> P = StringRef(HSOpts.ResourceDir);
       llvm::sys::path::append(P, "../../../i686-w64-mingw32/include");
@@ -330,7 +330,7 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
       AddPath("/mingw/include", System, false);
 #if defined(_WIN32)
       AddPath("c:/mingw/include", System, false); 
-#endif
+#endif*/
     }
     break;
       
@@ -394,24 +394,7 @@ AddDefaultCPlusPlusIncludePaths(const llvm::Triple &triple, const HeaderSearchOp
     AddMinGWCPlusPlusIncludePaths("/usr/lib/gcc", "i686-pc-cygwin", "4.3.2");
     break;
   case llvm::Triple::MinGW32:
-    // mingw-w64 C++ include paths (i686-w64-mingw32 and x86_64-w64-mingw32)
-    AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.7.0");
-    AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.7.1");
-    AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.7.2");
-    AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.7.3");
-    AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.8.0");
-    AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.8.1");
-    AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.8.2");
-    // mingw.org C++ include paths
-#if defined(_WIN32)
-    AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.7.0");
-    AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.7.1");
-    AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.7.2");
-    AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.7.3");
-    AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.8.0");
-    AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.8.1");
-    AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.8.2");
-#endif
+    // see driver::tools::mingw and driver::toolchains::MinGWToolChain
     break;
   case llvm::Triple::DragonFly:
     if (llvm::sys::fs::exists("/usr/lib/gcc47"))


More information about the cfe-dev mailing list