mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-11 04:06:20 +00:00
Do not include GCC "resource" directory into the set of built-in include paths on MingW.
Patch by Mateusz Mikuła. Differential Revision: https://reviews.llvm.org/D29464 llvm-svn: 297005
This commit is contained in:
parent
a6391ae52b
commit
3bf6fc2490
@ -148,23 +148,17 @@ void MinGW::printVerboseInfo(raw_ostream &OS) const {
|
||||
// c:\mingw\lib\gcc\mingw32\4.8.1\include\c++
|
||||
// c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\mingw32
|
||||
// c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\backward
|
||||
// c:\mingw\lib\gcc\mingw32\4.8.1\include
|
||||
// c:\mingw\include
|
||||
// c:\mingw\lib\gcc\mingw32\4.8.1\include-fixed
|
||||
// c:\mingw\mingw32\include
|
||||
|
||||
// Windows, mingw-w64 mingw-builds
|
||||
// c:\mingw32\lib\gcc\i686-w64-mingw32\4.9.1\include
|
||||
// c:\mingw32\lib\gcc\i686-w64-mingw32\4.9.1\include-fixed
|
||||
// c:\mingw32\i686-w64-mingw32\include
|
||||
// c:\mingw32\i686-w64-mingw32\include\c++
|
||||
// c:\mingw32\i686-w64-mingw32\include\c++\i686-w64-mingw32
|
||||
// c:\mingw32\i686-w64-mingw32\include\c++\backward
|
||||
|
||||
// Windows, mingw-w64 msys2
|
||||
// c:\msys64\mingw32\lib\gcc\i686-w64-mingw32\4.9.2\include
|
||||
// c:\msys64\mingw32\include
|
||||
// c:\msys64\mingw32\lib\gcc\i686-w64-mingw32\4.9.2\include-fixed
|
||||
// c:\msys64\mingw32\i686-w64-mingw32\include
|
||||
// c:\msys64\mingw32\include\c++\4.9.2
|
||||
// c:\msys64\mingw32\include\c++\4.9.2\i686-w64-mingw32
|
||||
@ -174,24 +168,18 @@ void MinGW::printVerboseInfo(raw_ostream &OS) const {
|
||||
// /usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/include/c++
|
||||
// /usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/include/c++/x86_64-w64-mingw32
|
||||
// /usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/include/c++/backward
|
||||
// /usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/include
|
||||
// /usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/include-fixed
|
||||
// /usr/x86_64-w64-mingw32/sys-root/mingw/include
|
||||
|
||||
// Arch Linux
|
||||
// /usr/i686-w64-mingw32/include/c++/5.1.0
|
||||
// /usr/i686-w64-mingw32/include/c++/5.1.0/i686-w64-mingw32
|
||||
// /usr/i686-w64-mingw32/include/c++/5.1.0/backward
|
||||
// /usr/lib/gcc/i686-w64-mingw32/5.1.0/include
|
||||
// /usr/lib/gcc/i686-w64-mingw32/5.1.0/include-fixed
|
||||
// /usr/i686-w64-mingw32/include
|
||||
|
||||
// Ubuntu
|
||||
// /usr/include/c++/4.8
|
||||
// /usr/include/c++/4.8/x86_64-w64-mingw32
|
||||
// /usr/include/c++/4.8/backward
|
||||
// /usr/lib/gcc/x86_64-w64-mingw32/4.8/include
|
||||
// /usr/lib/gcc/x86_64-w64-mingw32/4.8/include-fixed
|
||||
// /usr/x86_64-w64-mingw32/include
|
||||
|
||||
void MinGW::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
|
||||
@ -209,15 +197,11 @@ void MinGW::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
|
||||
return;
|
||||
|
||||
if (GetRuntimeLibType(DriverArgs) == ToolChain::RLT_Libgcc) {
|
||||
llvm::SmallString<1024> IncludeDir(GccLibDir);
|
||||
llvm::sys::path::append(IncludeDir, "include");
|
||||
addSystemInclude(DriverArgs, CC1Args, IncludeDir.c_str());
|
||||
IncludeDir += "-fixed";
|
||||
// openSUSE
|
||||
addSystemInclude(DriverArgs, CC1Args,
|
||||
Base + Arch + "/sys-root/mingw/include");
|
||||
addSystemInclude(DriverArgs, CC1Args, IncludeDir.c_str());
|
||||
}
|
||||
|
||||
addSystemInclude(DriverArgs, CC1Args,
|
||||
Base + Arch + llvm::sys::path::get_separator() + "include");
|
||||
addSystemInclude(DriverArgs, CC1Args, Base + "include");
|
||||
|
@ -7,8 +7,6 @@
|
||||
// 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"
|
||||
// CHECK_MINGW_ORG_TREE: "{{.*}}{{/|\\\\}}Inputs/mingw_mingw_org_tree/mingw{{/|\\\\}}lib{{/|\\\\}}gcc{{/|\\\\}}mingw32{{/|\\\\}}4.8.1{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}backward"
|
||||
// CHECK_MINGW_ORG_TREE: "{{.*}}/Inputs/mingw_mingw_org_tree/mingw{{/|\\\\}}lib{{/|\\\\}}gcc{{/|\\\\}}mingw32{{/|\\\\}}4.8.1{{/|\\\\}}include"
|
||||
// CHECK_MINGW_ORG_TREE: "{{.*}}/Inputs/mingw_mingw_org_tree/mingw{{/|\\\\}}lib{{/|\\\\}}gcc{{/|\\\\}}mingw32{{/|\\\\}}4.8.1{{/|\\\\}}include-fixed"
|
||||
// CHECK_MINGW_ORG_TREE: "{{.*}}/Inputs/mingw_mingw_org_tree/mingw{{/|\\\\}}mingw32{{/|\\\\}}include"
|
||||
// CHECK_MINGW_ORG_TREE: {{.*}}/Inputs/mingw_mingw_org_tree/mingw{{/|\\\\}}include
|
||||
|
||||
@ -17,8 +15,6 @@
|
||||
// CHECK_MINGW_BUILDS_TREE: "{{.*}}/Inputs/mingw_mingw_builds_tree/mingw32{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include{{/|\\\\}}c++"
|
||||
// CHECK_MINGW_BUILDS_TREE: "{{.*}}/Inputs/mingw_mingw_builds_tree/mingw32{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}i686-w64-mingw32"
|
||||
// CHECK_MINGW_BUILDS_TREE: "{{.*}}/Inputs/mingw_mingw_builds_tree/mingw32{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}backward"
|
||||
// CHECK_MINGW_BUILDS_TREE: "{{.*}}/Inputs/mingw_mingw_builds_tree/mingw32{{/|\\\\}}lib{{/|\\\\}}gcc{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}4.9.1{{/|\\\\}}include"
|
||||
// CHECK_MINGW_BUILDS_TREE: "{{.*}}/Inputs/mingw_mingw_builds_tree/mingw32{{/|\\\\}}lib{{/|\\\\}}gcc{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}4.9.1{{/|\\\\}}include-fixed"
|
||||
// CHECK_MINGW_BUILDS_TREE: "{{.*}}/Inputs/mingw_mingw_builds_tree/mingw32{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include"
|
||||
|
||||
|
||||
@ -26,8 +22,6 @@
|
||||
// CHECK_MINGW_MSYS_TREE: "{{.*}}/Inputs/mingw_msys2_tree/msys64{{/|\\\\}}mingw32{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}4.9.2"
|
||||
// CHECK_MINGW_MSYS_TREE: "{{.*}}/Inputs/mingw_msys2_tree/msys64/mingw32{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}4.9.2{{/|\\\\}}i686-w64-mingw32"
|
||||
// CHECK_MINGW_MSYS_TREE: "{{.*}}/Inputs/mingw_msys2_tree/msys64/mingw32{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}4.9.2{{/|\\\\}}backward"
|
||||
// CHECK_MINGW_MSYS_TREE: "{{.*}}/Inputs/mingw_msys2_tree/msys64/mingw32{{/|\\\\}}lib{{/|\\\\}}gcc{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}4.9.2{{/|\\\\}}include"
|
||||
// CHECK_MINGW_MSYS_TREE: "{{.*}}/Inputs/mingw_msys2_tree/msys64/mingw32{{/|\\\\}}lib{{/|\\\\}}gcc{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}4.9.2{{/|\\\\}}include-fixed"
|
||||
// CHECK_MINGW_MSYS_TREE: "{{.*}}/Inputs/mingw_msys2_tree/msys64/mingw32{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include"
|
||||
// CHECK_MINGW_MSYS_TREE: "{{.*}}/Inputs/mingw_msys2_tree/msys64/mingw32{{/|\\\\}}include"
|
||||
|
||||
@ -36,17 +30,13 @@
|
||||
// CHECK_MINGW_OPENSUSE_TREE: "{{.*}}/Inputs/mingw_opensuse_tree/usr{{/|\\\\}}lib64{{/|\\\\}}gcc{{/|\\\\}}x86_64-w64-mingw32{{/|\\\\}}5.1.0{{/|\\\\}}include{{/|\\\\}}c++"
|
||||
// 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: "{{.*}}/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"
|
||||
|
||||
|
||||
// RUN: %clang -target i686-pc-windows-gnu -rtlib=platform -stdlib=libstdc++ -c -### --sysroot=%S/Inputs/mingw_arch_tree/usr %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_ARCH_TREE %s
|
||||
// CHECK_MINGW_ARCH_TREE: "{{.*}}/Inputs/mingw_arch_tree/usr{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}5.1.0"
|
||||
// CHECK_MINGW_ARCH_TREE: "{{.*}}/Inputs/mingw_arch_tree/usr{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}5.1.0{{/|\\\\}}i686-w64-mingw32"
|
||||
// CHECK_MINGW_ARCH_TREE: "{{.*}}/Inputs/mingw_arch_tree/usr{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}5.1.0{{/|\\\\}}backward"
|
||||
// CHECK_MINGW_ARCH_TREE: "{{.*}}/Inputs/mingw_arch_tree/usr{{/|\\\\}}lib{{/|\\\\}}gcc{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}5.1.0{{/|\\\\}}include"
|
||||
// CHECK_MINGW_ARCH_TREE: "{{.*}}/Inputs/mingw_arch_tree/usr{{/|\\\\}}lib{{/|\\\\}}gcc{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}5.1.0{{/|\\\\}}include-fixed"
|
||||
// CHECK_MINGW_ARCH_TREE: "{{.*}}/Inputs/mingw_arch_tree/usr{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include"
|
||||
|
||||
|
||||
@ -54,6 +44,4 @@
|
||||
// CHECK_MINGW_UBUNTU_TREE: "{{.*}}/Inputs/mingw_ubuntu_tree/usr{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}4.8"
|
||||
// CHECK_MINGW_UBUNTU_TREE: "{{.*}}/Inputs/mingw_ubuntu_tree/usr{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}4.8{{/|\\\\}}x86_64-w64-mingw32"
|
||||
// CHECK_MINGW_UBUNTU_TREE: "{{.*}}/Inputs/mingw_ubuntu_tree/usr{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}4.8{{/|\\\\}}backward"
|
||||
// CHECK_MINGW_UBUNTU_TREE: "{{.*}}/Inputs/mingw_ubuntu_tree/usr{{/|\\\\}}lib{{/|\\\\}}gcc{{/|\\\\}}x86_64-w64-mingw32{{/|\\\\}}4.8{{/|\\\\}}include"
|
||||
// CHECK_MINGW_UBUNTU_TREE: "{{.*}}/Inputs/mingw_ubuntu_tree/usr{{/|\\\\}}lib{{/|\\\\}}gcc{{/|\\\\}}x86_64-w64-mingw32{{/|\\\\}}4.8{{/|\\\\}}include-fixed"
|
||||
// CHECK_MINGW_UBUNTU_TREE: "{{.*}}/Inputs/mingw_ubuntu_tree/usr{{/|\\\\}}x86_64-w64-mingw32{{/|\\\\}}include"
|
||||
|
Loading…
x
Reference in New Issue
Block a user