[PATCH] D11808: Driver: Fix include and lib dirs when not using gcc under mingw

Martell Malone via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 12 17:14:58 PDT 2015


martell updated this revision to Diff 32007.
martell added a comment.

Updated to address yaron's comments.

Okay for me to merge now ?


http://reviews.llvm.org/D11808

Files:
  lib/Driver/MinGWToolChain.cpp
  test/Driver/Inputs/mingw_clang_tree/mingw32/i686-w64-mingw32/include/.keep
  test/Driver/Inputs/mingw_clang_tree/mingw32/include/.keep
  test/Driver/mingw.cpp

Index: test/Driver/mingw.cpp
===================================================================
--- test/Driver/mingw.cpp
+++ test/Driver/mingw.cpp
@@ -1,3 +1,8 @@
+// RUN: %clang -target i686-windows-gnu -c -### --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_CLANG_TREE %s
+// CHECK_MINGW_CLANG_TREE: "{{.*}}/Inputs/mingw_clang_tree/mingw32{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include"
+// CHECK_MINGW_CLANG_TREE: "{{.*}}/Inputs/mingw_clang_tree/mingw32{{/|\\\\}}include"
+
+
 // RUN: %clang -target i686-pc-windows-gnu -stdlib=libstdc++ -c -### --sysroot=%S/Inputs/mingw_mingw_org_tree/mingw %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_ORG_TREE %s
 // CHECK_MINGW_ORG_TREE: "{{.*}}/Inputs/mingw_mingw_org_tree/mingw{{/|\\\\}}lib{{/|\\\\}}gcc{{/|\\\\}}mingw32{{/|\\\\}}4.8.1{{/|\\\\}}include{{/|\\\\}}c++"
 // CHECK_MINGW_ORG_TREE: "{{.*}}/Inputs/mingw_mingw_org_tree/mingw{{/|\\\\}}lib{{/|\\\\}}gcc{{/|\\\\}}mingw32{{/|\\\\}}4.8.1{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}mingw32"
Index: lib/Driver/MinGWToolChain.cpp
===================================================================
--- lib/Driver/MinGWToolChain.cpp
+++ lib/Driver/MinGWToolChain.cpp
@@ -47,7 +47,7 @@
   Archs.emplace_back(getTriple().getArchName());
   Archs[0] += "-w64-mingw32";
   Archs.emplace_back("mingw32");
-  Arch = "unknown";
+  Arch = Archs[0].str();
   // lib: Arch Linux, Ubuntu, Windows
   // lib64: openSUSE Linux
   for (StringRef CandidateLib : {"lib", "lib64"}) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11808.32007.patch
Type: text/x-patch
Size: 1500 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150813/d588a9ff/attachment.bin>


More information about the cfe-commits mailing list