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 | |
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
-rw-r--r-- | Driver/clang.cpp | 11 | ||||
-rw-r--r-- | lib/Headers/Makefile | 14 |
2 files changed, 15 insertions, 10 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. diff --git a/lib/Headers/Makefile b/lib/Headers/Makefile index 98b82c3980..77eb96dc4d 100644 --- a/lib/Headers/Makefile +++ b/lib/Headers/Makefile @@ -10,7 +10,8 @@ LEVEL = ../../../.. include $(LEVEL)/Makefile.common -HeaderDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/Headers +# FIXME: Get version from a common place. +HeaderDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib/clang/1.0/include HEADERS := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.h)) @@ -19,16 +20,12 @@ OBJHEADERS := $(addprefix $(HeaderDir)/, $(HEADERS)) $(OBJHEADERS): $(HeaderDir)/%.h: $(PROJ_SRC_DIR)/%.h $(HeaderDir)/.dir $(Verb) cp $< $@ - @echo Copying $(notdir $<) to build dir - -printit: - echo $(OBJHEADERS) - echo $(PROJ_SRC_DIR) - + $(Echo) Copying $(notdir $<) to build dir + # Hook into the standard Makefile rules. all-local:: $(OBJHEADERS) -PROJ_headers := $(DESTDIR)$(PROJ_prefix)/Headers +PROJ_headers := $(DESTDIR)$(PROJ_prefix)/lib/clang/1.0/include INSTHEADERS := $(addprefix $(PROJ_headers)/, $(HEADERS)) @@ -37,6 +34,7 @@ $(PROJ_headers): $(INSTHEADERS): $(PROJ_headers)/%.h: $(HeaderDir)/%.h | $(PROJ_headers) $(Verb) $(DataInstall) $< $(PROJ_headers) + $(Echo) Installing compiler include file: $(notdir $<) install-local:: $(INSTHEADERS) |