rebuild clang plugin when clang changes

Change-Id: Ia4192224d0b217ba2393dc457250cf12febe9306
This commit is contained in:
Luboš Luňák
2012-10-12 11:50:42 +02:00
parent bd7e427ce5
commit f56da8c967

View File

@@ -50,7 +50,7 @@ $(CLANGOUTDIR):
CLANGOBJS=
define clangbuildsrc
$(3): $(2) $(SRCDIR)/compilerplugins/Makefile-clang.mk
$(3): $(2) $(SRCDIR)/compilerplugins/Makefile-clang.mk $(CLANGOUTDIR)/clang-timestamp
$(CXX) $(CLANGCXXFLAGS) $(CLANGDEFS) $(CLANGINCLUDES) $(2) -fPIC -c -o $(3) -MMD -MT $(3) -MP -MF $(CLANGOUTDIR)/$(1).d
-include $(CLANGOUTDIR)/$(1).d
@@ -64,4 +64,8 @@ $(foreach src, $(CLANGSRC), $(eval $(call clangbuildsrc,$(src),$(CLANGINDIR)/$(s
$(CLANGOUTDIR)/compileplugin.so: $(CLANGOBJS)
$(CXX) -shared $(CLANGOBJS) -o $@
# Clang most probably doesn't maintain binary compatibility, so rebuild when clang changes.
$(CLANGOUTDIR)/clang-timestamp: $(CLANGBUILD)/bin/clang
touch $@ -r $^
# vim: set noet sw=4 ts=4: