Sorry for the delay. I'm still not convinced that the LLVM_ON_WIN32 ifdefs are 
really the behavior we want for clang, but holding this patch up isn't helping. 
We keep getting bug reports from users who don't know how to find their mingw 
installation.


================
Comment at: lib/Driver/MinGWToolChain.cpp:38
@@ +37,3 @@
+#ifdef LLVM_ON_WIN32
+          getDriver().Dir + "/../lib/gcc/" + getTriple().getArchName().str() + 
"-w64-mingw32";
+#else
----------------
It took me a while to remember, but I think my primary issue with this change 
is that this line here makes clang inside mingw behave wildly differently from 
clang outside mingw's bin directory, without any way for the user to say "my 
toolchain is here, please use it". They have to resort to -isystem and -L, 
which is lame.

Still, this is an improvement, and we should probably move ahead with it.

================
Comment at: lib/Driver/MinGWToolChain.cpp:52
@@ +51,3 @@
+#ifdef LLVM_ON_WIN32
+  // assume sysrooted compiler
+  getFilePaths().push_back(getDriver().Dir + "/../lib");
----------------
nit: Please make comments into complete sentences, with a leading uppercase 
letter and period.

What does "assume sysrooted compiler" mean anyway? It seems like you're really 
assuming that Clang is installed inside a mingw installation bin directory, and 
we should look relative to that for libs. The Linux case is the one that's 
looking relative to a sysroot, so far as I can tell.

================
Comment at: lib/Driver/MinGWToolChain.cpp:194
@@ +193,3 @@
+                   + "/include/c++/" + GCCVersion + "/backward");
+#endif
+}
----------------
Please run clang-format to avoid 80col+ lines.

http://reviews.llvm.org/D5268

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to