compilerplugins/Makefile-clang.mk | 2 +- compilerplugins/clang/plugin.cxx | 2 -- compilerplugins/clang/plugin.hxx | 2 ++ compilerplugins/clang/sallogareas.cxx | 2 -- config/config_clang.h.in | 4 ++++ configure.ac | 1 + 6 files changed, 8 insertions(+), 5 deletions(-)
New commits: commit 62532ad485698b70924c54a222890ebcb714dc39 Author: LuboÅ¡ LuÅák <l.lu...@suse.cz> Date: Sun Jan 6 18:09:04 2013 +0100 do not set our clang timestamp to the timestamp of the clang binary If the clang binary comes from a package which had been built before any of our clang related sources were changed the last time, the timestamp would be older and so there would be no rebuild. So do the stamp handling the usual way, clang upgrades will work fine, downgrades will not, but that's the same problem like with downgrading a library and its headers. To somewhat mitigate the problem (Clang plugin doesn't get cleaned by 'make clean'), include the full Clang version (which includes SVN revision) in config_clang.h and make all Clang plugin code include that, so at least configure re-run will trigger a rebuild if necessary. Change-Id: I993197f79e92e36105092c92c33b2e1db343e975 diff --git a/compilerplugins/Makefile-clang.mk b/compilerplugins/Makefile-clang.mk index e652e44..53c0f2c 100644 --- a/compilerplugins/Makefile-clang.mk +++ b/compilerplugins/Makefile-clang.mk @@ -69,6 +69,6 @@ $(CLANGOUTDIR)/plugin.so: $(CLANGOBJS) # Clang most probably doesn't maintain binary compatibility, so rebuild when clang changes. $(CLANGOUTDIR)/clang-timestamp: $(CLANGDIR)/bin/clang - touch $@ -r $^ + touch $@ # vim: set noet sw=4 ts=4: diff --git a/compilerplugins/clang/plugin.cxx b/compilerplugins/clang/plugin.cxx index 11791b1..7c4256b 100644 --- a/compilerplugins/clang/plugin.cxx +++ b/compilerplugins/clang/plugin.cxx @@ -26,8 +26,6 @@ #include "sallogareas.hxx" #include "unusedvariablecheck.hxx" -#include <config_clang.h> - namespace loplugin { diff --git a/compilerplugins/clang/plugin.hxx b/compilerplugins/clang/plugin.hxx index b9409b2..af1394d 100644 --- a/compilerplugins/clang/plugin.hxx +++ b/compilerplugins/clang/plugin.hxx @@ -11,6 +11,8 @@ #ifndef PLUGIN_H #define PLUGIN_H +#include <config_clang.h> + #include <clang/AST/RecursiveASTVisitor.h> #if __clang_major__ < 3 || __clang_major__ == 3 && __clang_minor__ < 2 diff --git a/compilerplugins/clang/sallogareas.cxx b/compilerplugins/clang/sallogareas.cxx index 4462413..7e6c187 100644 --- a/compilerplugins/clang/sallogareas.cxx +++ b/compilerplugins/clang/sallogareas.cxx @@ -16,8 +16,6 @@ #include <fstream> -#include <config_clang.h> - namespace loplugin { diff --git a/config/config_clang.h.in b/config/config_clang.h.in index 9d87e7a..056d3e8 100644 --- a/config/config_clang.h.in +++ b/config/config_clang.h.in @@ -12,4 +12,8 @@ Settings related to Clang compiler plugins. #undef SRCDIR #undef WORKDIR +/* This is actually unused, but it should change whenever Clang changes, +thus causing update of this .h file and triggerring rebuild of our Clang plugin. */ +#undef CLANG_FULL_VERSION + #endif diff --git a/configure.ac b/configure.ac index bd5b074..29cc392 100644 --- a/configure.ac +++ b/configure.ac @@ -2906,6 +2906,7 @@ if test "$GCC" = "yes"; then CLANG_FULL_VERSION=`echo __clang_version__ | $CC -E -P -` CLANGVER=`echo $clang_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` AC_MSG_RESULT([Clang $CLANG_FULL_VERSION, $CLANGVER]) + AC_DEFINE_UNQUOTED(CLANG_FULL_VERSION,$CLANG_FULL_VERSION) fi fi AC_SUBST(COM_GCC_IS_CLANG)
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits