[PATCH] D45500: [MinGW] Look for libc++ headers in a triplet prefixed path as well
Martin Storsjö via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 12 13:10:58 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rC329946: [MinGW] Look for libc++ headers in a triplet prefixed path as well (authored by mstorsjo, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D45500?vs=141894&id=142243#toc
Repository:
rC Clang
https://reviews.llvm.org/D45500
Files:
lib/Driver/ToolChains/MinGW.cpp
test/Driver/mingw.cpp
Index: test/Driver/mingw.cpp
===================================================================
--- test/Driver/mingw.cpp
+++ test/Driver/mingw.cpp
@@ -3,6 +3,10 @@
// CHECK_MINGW_CLANG_TREE: "{{.*}}/Inputs/mingw_clang_tree/mingw32{{/|\\\\}}include"
+// RUN: %clang -target i686-windows-gnu -rtlib=platform -stdlib=libc++ -c -### --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_CLANG_TREE_LIBCXX %s
+// CHECK_MINGW_CLANG_TREE_LIBCXX: "{{.*}}/Inputs/mingw_clang_tree/mingw32{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}v1"
+
+
// RUN: %clang -target i686-pc-windows-gnu -rtlib=platform -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/ToolChains/MinGW.cpp
===================================================================
--- lib/Driver/ToolChains/MinGW.cpp
+++ lib/Driver/ToolChains/MinGW.cpp
@@ -453,11 +453,14 @@
DriverArgs.hasArg(options::OPT_nostdincxx))
return;
+ StringRef Slash = llvm::sys::path::get_separator();
+
switch (GetCXXStdlibType(DriverArgs)) {
case ToolChain::CST_Libcxx:
+ addSystemInclude(DriverArgs, CC1Args, Base + Arch + Slash + "include" +
+ Slash + "c++" + Slash + "v1");
addSystemInclude(DriverArgs, CC1Args,
- Base + "include" + llvm::sys::path::get_separator() +
- "c++" + llvm::sys::path::get_separator() + "v1");
+ Base + "include" + Slash + "c++" + Slash + "v1");
break;
case ToolChain::CST_Libstdcxx:
@@ -472,7 +475,7 @@
llvm::sys::path::append(CppIncludeBases[3], "include", "c++");
for (auto &CppIncludeBase : CppIncludeBases) {
addSystemInclude(DriverArgs, CC1Args, CppIncludeBase);
- CppIncludeBase += llvm::sys::path::get_separator();
+ CppIncludeBase += Slash;
addSystemInclude(DriverArgs, CC1Args, CppIncludeBase + Arch);
addSystemInclude(DriverArgs, CC1Args, CppIncludeBase + "backward");
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45500.142243.patch
Type: text/x-patch
Size: 2430 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180412/02ad61b2/attachment-0001.bin>
More information about the cfe-commits
mailing list