From: Yaron Keren Date: Fri, 24 Jul 2015 19:18:17 +0000 (+0000) Subject: Base the sys-root/mingw/include path on sysroot and not on /usr. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d76ce19f2e0840a8254de9c9db97192f75058028;p=clang Base the sys-root/mingw/include path on sysroot and not on /usr. Thanks to Richard Smith for pointing this out! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@243144 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/MinGWToolChain.cpp b/lib/Driver/MinGWToolChain.cpp index d68c8afdd7..c4aac04556 100644 --- a/lib/Driver/MinGWToolChain.cpp +++ b/lib/Driver/MinGWToolChain.cpp @@ -202,7 +202,7 @@ void MinGW::AddClangSystemIncludeArgs(const ArgList &DriverArgs, IncludeDir += "-fixed"; // openSUSE addSystemInclude(DriverArgs, CC1Args, - "/usr/x86_64-w64-mingw32/sys-root/mingw/include"); + Base + Arch + "/sys-root/mingw/include"); addSystemInclude(DriverArgs, CC1Args, IncludeDir.c_str()); } addSystemInclude(DriverArgs, CC1Args, diff --git a/test/Driver/mingw.cpp b/test/Driver/mingw.cpp index 4f4c4bd44b..5625c88b80 100644 --- a/test/Driver/mingw.cpp +++ b/test/Driver/mingw.cpp @@ -32,7 +32,7 @@ // CHECK_MINGW_OPENSUSE_TREE: "{{.*}}/Inputs/mingw_opensuse_tree/usr{{/|\\\\}}lib64{{/|\\\\}}gcc{{/|\\\\}}x86_64-w64-mingw32{{/|\\\\}}5.1.0{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}x86_64-w64-mingw32" // CHECK_MINGW_OPENSUSE_TREE: "{{.*}}/Inputs/mingw_opensuse_tree/usr{{/|\\\\}}lib64{{/|\\\\}}gcc{{/|\\\\}}x86_64-w64-mingw32{{/|\\\\}}5.1.0{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}backward" // CHECK_MINGW_OPENSUSE_TREE: "{{.*}}/Inputs/mingw_opensuse_tree/usr{{/|\\\\}}lib64{{/|\\\\}}gcc{{/|\\\\}}x86_64-w64-mingw32{{/|\\\\}}5.1.0{{/|\\\\}}include" -// CHECK_MINGW_OPENSUSE_TREE: "/usr/x86_64-w64-mingw32/sys-root/mingw/include" +// CHECK_MINGW_OPENSUSE_TREE: "{{.*}}/Inputs/mingw_opensuse_tree/usr{{/|\\\\}}x86_64-w64-mingw32/sys-root/mingw/include" // CHECK_MINGW_OPENSUSE_TREE: "{{.*}}/Inputs/mingw_opensuse_tree/usr{{/|\\\\}}lib64{{/|\\\\}}gcc{{/|\\\\}}x86_64-w64-mingw32{{/|\\\\}}5.1.0{{/|\\\\}}include-fixed"