fix-clang-path-and-build
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Sat, 12 Aug 2017 09:38:36 +0000 (10:38 +0100)
committerSylvestre Ledru <sylvestre@debian.org>
Sat, 12 Aug 2017 09:38:36 +0000 (10:38 +0100)
Gbp-Pq: Name fix-clang-path-and-build.diff

clang/lib/Driver/ToolChains/Gnu.cpp

index 72a9f85ba389a12b26a5164d6023f8249e041e1a..d8721bc2ebb13ca532080141e2064689f6ed9138 100644 (file)
@@ -15,6 +15,7 @@
 #include "Arch/SystemZ.h"
 #include "CommonArgs.h"
 #include "clang/Basic/VirtualFileSystem.h"
+#include "clang/Basic/Version.h"
 #include "clang/Config/config.h" // for GCC_INSTALL_PREFIX
 #include "clang/Driver/Compilation.h"
 #include "clang/Driver/Driver.h"
@@ -2356,6 +2357,8 @@ void Generic_GCC::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
       DriverArgs.hasArg(options::OPT_nostdincxx))
     return;
 
+  addSystemInclude(DriverArgs, CC1Args, "/usr/include/clang/" + std::string(CLANG_VERSION_STRING) + "/include/");
+
   switch (GetCXXStdlibType(DriverArgs)) {
   case ToolChain::CST_Libcxx: {
     std::string Path = findLibCxxIncludePath();