adjust clang plugins for srcdir != builddir

Change-Id: Ie4c934b52c4b010703e91f84b83e1fe590b5d187
This commit is contained in:
Luboš Luňák
2012-12-11 15:45:16 +01:00
parent c8c056fd20
commit 2ac26dc83f
2 changed files with 4 additions and 4 deletions

View File

@@ -37,7 +37,7 @@ CLANGINCLUDES=-I$(CLANGDIR)/include -I$(CLANGDIR)/tools/clang/include -I$(CLANGB
CLANGINDIR=$(SRCDIR)/compilerplugins/clang
# Cannot use $(WORKDIR), the plugin should survive even 'make clean', otherwise the rebuilt
# plugin will cause cache misses with ccache.
CLANGOUTDIR=$(SRCDIR)/compilerplugins/obj
CLANGOUTDIR=$(BUILDDIR)/compilerplugins/obj
compilerplugins: $(CLANGOUTDIR) $(CLANGOUTDIR)/plugin.so
@@ -63,7 +63,7 @@ endef
$(foreach src, $(CLANGSRC), $(eval $(call clangbuildsrc,$(src),$(CLANGINDIR)/$(src),$(CLANGOUTDIR)/$(src:.cxx=.o))))
$(CLANGOUTDIR)/plugin.so: $(CLANGOBJS)
@echo [build LNK] $(subst $(SRCDIR)/,,$@)
@echo [build LNK] $(subst $(BUILDDIR)/,,$@)
$(CXX) -shared $(CLANGOBJS) -o $@
# Clang most probably doesn't maintain binary compatibility, so rebuild when clang changes.