diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-02-21 20:52:41 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-02-21 20:52:41 +0000 |
commit | adcf5b389acd7998742e3d2e807f72ef3abb8cfb (patch) | |
tree | 8a987c941952008164496256d64e468edeed5943 /Driver | |
parent | 15509f4fe73f0e11a8cec602bce4d99d9454b7f6 (diff) | |
download | clang-adcf5b389acd7998742e3d2e807f72ef3abb8cfb.tar.gz |
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
Diffstat (limited to 'Driver')
-rw-r--r-- | Driver/clang.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Driver/clang.cpp b/Driver/clang.cpp index 525c27facc..d17f77b0a8 100644 --- a/Driver/clang.cpp +++ b/Driver/clang.cpp @@ -1090,14 +1090,21 @@ void InitializeIncludePaths(const char *Argv0, HeaderSearch &Headers, 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. |