compilerplugins/clang/plugin.hxx | 2 -- config_host/config_clang.h.in | 4 ---- configure.ac | 3 +-- 3 files changed, 1 insertion(+), 8 deletions(-)
New commits: commit efe28895498b03f1468a9dc9f510452f36affc2f Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Wed Dec 5 14:50:07 2018 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Thu Dec 6 08:37:14 2018 +0100 Remove broken rebuild of compilerplugins when CLANG_FULL_VERSION changed Not all compilerplugins/clang/*.cxx depend on config_clang.h (e.g., check.cxx doesn't), so this mechanism trying to rebuild compilerplugins once the underlying Clang installation changes doesn't work reliably in practice (just debugged through this with Miklos on IRC, and it wasn't the first time that `make distclean` fixed compilerplugins for somebody after they upgraded their Clang installation). Removing the brittle mechanism shows that plugin.hxx doesn't actually depend on config_clang.h. (There's a second mechanism trying to rebuild compilerplugins once the underlying Clang installation changes, namely > # Clang most probably doesn't maintain binary compatibility, so rebuild when clang changes. > $(CLANGOUTDIR)/clang-timestamp: $(CLANGDIR)/bin/clang$(CLANG_EXE_EXT) > $(QUIET)touch $@ in compilerplugins/Makefile-clang.mk, but that doesn't work reliably either, as it depends on the newly installed clang executable being newer than our clang-timestamp file, which will be the case for self-built Clang installations, but not necessarily when updating e.g. a distro-provided Clang installation.) Change-Id: Ie576f14356b3f0e55444375095c86aa851404bf3 Reviewed-on: https://gerrit.libreoffice.org/64623 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/compilerplugins/clang/plugin.hxx b/compilerplugins/clang/plugin.hxx index 0157540ee680..4aab4beb4b8d 100644 --- a/compilerplugins/clang/plugin.hxx +++ b/compilerplugins/clang/plugin.hxx @@ -12,8 +12,6 @@ #ifndef PLUGIN_H #define PLUGIN_H -#include <config_clang.h> - #include <clang/AST/ASTContext.h> #include <clang/AST/RecursiveASTVisitor.h> #include <clang/Basic/FileManager.h> diff --git a/config_host/config_clang.h.in b/config_host/config_clang.h.in index c19c0875ce86..66629bfd780e 100644 --- a/config_host/config_clang.h.in +++ b/config_host/config_clang.h.in @@ -13,8 +13,4 @@ Settings related to Clang compiler plugins. #undef CLANG_VERSION -/* This is actually unused, but it should change whenever Clang changes, -thus causing update of this .h file and triggering rebuild of our Clang plugin. */ -#undef CLANG_FULL_VERSION - #endif diff --git a/configure.ac b/configure.ac index ac7dfdeafbdd..d338e625638c 100644 --- a/configure.ac +++ b/configure.ac @@ -3673,16 +3673,15 @@ if test "$COM_IS_CLANG" = TRUE; then my_args="-E -P" fi clang_version=`echo __clang_major__.__clang_minor__.__clang_patchlevel__ | $CC_PLAIN $my_args -` - CLANG_FULL_VERSION=`echo __clang_version__ | $CC_PLAIN $my_args -` CLANGVER=`echo $clang_version \ | $AWK -F. '{ print \$1*10000+(\$2<100?\$2:99)*100+(\$3<100?\$3:99) }'` if test "$CLANGVER" -ge 50002; then AC_MSG_RESULT([yes ($clang_version)]) else + CLANG_FULL_VERSION=`echo __clang_version__ | $CC_PLAIN $my_args -` AC_MSG_ERROR(["$CLANG_FULL_VERSION" is too old or unrecognized, must be at least Clang 5.0.2]) fi AC_DEFINE_UNQUOTED(CLANG_VERSION,$CLANGVER) - AC_DEFINE_UNQUOTED(CLANG_FULL_VERSION,$CLANG_FULL_VERSION) fi fi _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits