Put compiler headers in <prefix>/lib/clang/1.0/include (vs
<prefix>/Headers, gross).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65247 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index 525c27f..d17f77b 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -1090,14 +1090,21 @@
Init.AddDefaultEnvVarPaths(Lang);
- // Add the clang headers, which are relative to the clang driver.
+ // Add the clang headers, which are relative to the clang binary.
llvm::sys::Path MainExecutablePath =
llvm::sys::Path::GetMainExecutable(Argv0,
(void*)(intptr_t)InitializeIncludePaths);
if (!MainExecutablePath.isEmpty()) {
MainExecutablePath.eraseComponent(); // Remove /clang from foo/bin/clang
MainExecutablePath.eraseComponent(); // Remove /bin from foo/bin
- MainExecutablePath.appendComponent("Headers"); // Get foo/Headers
+
+ // Get foo/lib/clang/1.0/include
+ //
+ // FIXME: Don't embed version here.
+ MainExecutablePath.appendComponent("lib");
+ MainExecutablePath.appendComponent("clang");
+ MainExecutablePath.appendComponent("1.0");
+ MainExecutablePath.appendComponent("include");
// We pass true to ignore sysroot so that we *always* look for clang headers
// relative to our executable, never relative to -isysroot.