r244902 - Driver: Fix include directories when not using libgcc under mingw

Hans Wennborg via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 18 15:00:12 PDT 2015


Richard, I tried to ping you on the review thread but I'm not sure it
got through. Martell requested this be merged to 3.7. What do you
think?

On Thu, Aug 13, 2015 at 8:41 AM, Martell Malone via cfe-commits
<cfe-commits at lists.llvm.org> wrote:
> Author: martell
> Date: Thu Aug 13 10:41:04 2015
> New Revision: 244902
>
> URL: http://llvm.org/viewvc/llvm-project?rev=244902&view=rev
> Log:
> 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
>
> Added:
>     cfe/trunk/test/Driver/Inputs/mingw_clang_tree/
>     cfe/trunk/test/Driver/Inputs/mingw_clang_tree/mingw32/
>     cfe/trunk/test/Driver/Inputs/mingw_clang_tree/mingw32/i686-w64-mingw32/
>     cfe/trunk/test/Driver/Inputs/mingw_clang_tree/mingw32/i686-w64-mingw32/include/
>     cfe/trunk/test/Driver/Inputs/mingw_clang_tree/mingw32/i686-w64-mingw32/include/.keep
>     cfe/trunk/test/Driver/Inputs/mingw_clang_tree/mingw32/include/
>     cfe/trunk/test/Driver/Inputs/mingw_clang_tree/mingw32/include/.keep
> Modified:
>     cfe/trunk/lib/Driver/MinGWToolChain.cpp
>     cfe/trunk/test/Driver/mingw.cpp
>
> Modified: cfe/trunk/lib/Driver/MinGWToolChain.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/MinGWToolChain.cpp?rev=244902&r1=244901&r2=244902&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Driver/MinGWToolChain.cpp (original)
> +++ cfe/trunk/lib/Driver/MinGWToolChain.cpp Thu Aug 13 10:41:04 2015
> @@ -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"}) {
>
> Added: cfe/trunk/test/Driver/Inputs/mingw_clang_tree/mingw32/i686-w64-mingw32/include/.keep
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mingw_clang_tree/mingw32/i686-w64-mingw32/include/.keep?rev=244902&view=auto
> ==============================================================================
>     (empty)
>
> Added: cfe/trunk/test/Driver/Inputs/mingw_clang_tree/mingw32/include/.keep
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mingw_clang_tree/mingw32/include/.keep?rev=244902&view=auto
> ==============================================================================
>     (empty)
>
> Modified: cfe/trunk/test/Driver/mingw.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/mingw.cpp?rev=244902&r1=244901&r2=244902&view=diff
> ==============================================================================
> --- cfe/trunk/test/Driver/mingw.cpp (original)
> +++ cfe/trunk/test/Driver/mingw.cpp Thu Aug 13 10:41:04 2015
> @@ -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"
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


More information about the cfe-commits mailing list