nixpkgs-suyu/pkgs/development/compilers/llvm/clang-include-paths.patch
Shea Levy 006d8dcdc1 clang-3.0
This required moving to the cmake build for llvm in order to build clang
separately from llvm.

svn path=/nixpkgs/trunk/; revision=30956
2011-12-19 12:48:09 +00:00

49 lines
1.7 KiB
Diff

diff -Naur clang-3.0.src-orig/lib/Driver/ToolChains.cpp clang-3.0.src/lib/Driver/ToolChains.cpp
--- clang-3.0.src-orig/lib/Driver/ToolChains.cpp 2011-11-17 02:40:32.000000000 -0500
+++ clang-3.0.src/lib/Driver/ToolChains.cpp 2011-12-19 06:29:27.562428830 -0500
@@ -1926,14 +1926,17 @@
if (DriverArgs.hasArg(options::OPT_nostdinc))
return;
+#if 0
if (!DriverArgs.hasArg(options::OPT_nostdlibinc))
addSystemInclude(DriverArgs, CC1Args, D.SysRoot + "/usr/local/include");
+#endif
if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) {
llvm::sys::Path P(D.ResourceDir);
P.appendComponent("include");
addSystemInclude(DriverArgs, CC1Args, P.str());
}
+#if 0
if (DriverArgs.hasArg(options::OPT_nostdlibinc))
return;
@@ -1998,6 +2001,8 @@
return;
addExternCSystemInclude(DriverArgs, CC1Args, D.SysRoot + "/usr/include");
+#endif
+ addExternCSystemInclude(DriverArgs, CC1Args, D.SysRoot + C_INCLUDE_PATH);
}
static bool addLibStdCXXIncludePaths(Twine Base, Twine TargetArchDir,
@@ -2030,6 +2035,7 @@
bool IsTarget64Bit = (TargetArch == llvm::Triple::x86_64 ||
TargetArch == llvm::Triple::ppc64);
+#if 0
StringRef CxxIncludeRoot(CXX_INCLUDE_ROOT);
if (!CxxIncludeRoot.empty()) {
StringRef CxxIncludeArch(CXX_INCLUDE_ARCH);
@@ -2072,6 +2078,10 @@
GCCInstallation.getTriple() + Suffix,
DriverArgs, CC1Args);
}
+#endif
+ addLibStdCXXIncludePaths(CPP_INCLUDE_PATH,
+ CPP_HOST,
+ DriverArgs, CC1Args);
}
/// DragonFly - DragonFly tool chain which can call as(1) and ld(1) directly.