[PATCH] D29464: [MinGWToolChain] Don't use GCC headers on Win32

Mateusz MikuĊ‚a via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 2 10:47:04 PST 2017


mati865 created this revision.
mati865 added a project: clang-c.

Header guards in GCC limits.h were stopping Clang from going up one more level to the system limits.h


https://reviews.llvm.org/D29464

Files:
  lib/Driver/MinGWToolChain.cpp


Index: lib/Driver/MinGWToolChain.cpp
===================================================================
--- lib/Driver/MinGWToolChain.cpp
+++ lib/Driver/MinGWToolChain.cpp
@@ -208,6 +208,7 @@
   if (DriverArgs.hasArg(options::OPT_nostdlibinc))
     return;
 
+#ifndef LLVM_ON_WIN32
   if (GetRuntimeLibType(DriverArgs) == ToolChain::RLT_Libgcc) {
     llvm::SmallString<1024> IncludeDir(GccLibDir);
     llvm::sys::path::append(IncludeDir, "include");
@@ -218,6 +219,7 @@
                      Base + Arch + "/sys-root/mingw/include");
     addSystemInclude(DriverArgs, CC1Args, IncludeDir.c_str());
   }
+#endif
   addSystemInclude(DriverArgs, CC1Args,
                    Base + Arch + llvm::sys::path::get_separator() + "include");
   addSystemInclude(DriverArgs, CC1Args, Base + "include");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29464.86827.patch
Type: text/x-patch
Size: 796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170202/de9b9e2f/attachment.bin>


More information about the cfe-commits mailing list