Skip to content

Commit

Permalink
Merging r244902:
Browse files Browse the repository at this point in the history
------------------------------------------------------------------------
r244902 | martell | 2015-08-13 08:41:04 -0700 (Thu, 13 Aug 2015) | 12 lines

Driver: Fix include directories when not using libgcc under mingw

Summary:
When we want to use mingw-w64 and clang with compiler-rt we should not
need to have libgcc installed. This fixes finding includes when libgcc
is not installed

Reviewers: yaron.keren

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D11808
------------------------------------------------------------------------

llvm-svn: 245393
  • Loading branch information
zmodem committed Aug 19, 2015
1 parent 5e7866c commit f57c913
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/Driver/MinGWToolChain.cpp
Expand Up @@ -47,7 +47,7 @@ void MinGW::findGccLibDir() {
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"}) {
Expand Down
Empty file.
Empty file.
5 changes: 5 additions & 0 deletions clang/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"
Expand Down

0 comments on commit f57c913

Please sign in to comment.