Kaydet (Commit) d4bb16ad authored tarafından Luboš Luňák's avatar Luboš Luňák

Revert "Remove broken rebuild of compilerplugins when CLANG_FULL_VERSION..."

This reverts commit efe28895.
It is that commit that is broken. The only thing that does not work is
that not all compilerplugin sources depend on config_clang.h, the rest is fine.
So instead of reverting something that in principle works (and even complaining
in the commit message about the original problem), just fix it
(will do in next commit).

Change-Id: Ic7766a97220d5b7ef1cd195320899564140fdf1c
Reviewed-on: https://gerrit.libreoffice.org/72975
Tested-by: Jenkins
Reviewed-by: 's avatarLuboš Luňák <l.lunak@collabora.com>
üst 49c88d8b
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
#ifndef PLUGIN_H #ifndef PLUGIN_H
#define PLUGIN_H #define PLUGIN_H
#include <config_clang.h>
#include <clang/AST/ASTContext.h> #include <clang/AST/ASTContext.h>
#include <clang/AST/RecursiveASTVisitor.h> #include <clang/AST/RecursiveASTVisitor.h>
#include <clang/Basic/FileManager.h> #include <clang/Basic/FileManager.h>
......
...@@ -13,4 +13,8 @@ Settings related to Clang compiler plugins. ...@@ -13,4 +13,8 @@ Settings related to Clang compiler plugins.
#undef CLANG_VERSION #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 #endif
...@@ -3673,15 +3673,16 @@ if test "$COM_IS_CLANG" = TRUE; then ...@@ -3673,15 +3673,16 @@ if test "$COM_IS_CLANG" = TRUE; then
my_args="-E -P" my_args="-E -P"
fi fi
clang_version=`echo __clang_major__.__clang_minor__.__clang_patchlevel__ | $CC_PLAIN $my_args - | sed 's/ //g'` clang_version=`echo __clang_major__.__clang_minor__.__clang_patchlevel__ | $CC_PLAIN $my_args - | sed 's/ //g'`
CLANG_FULL_VERSION=`echo __clang_version__ | $CC_PLAIN $my_args -`
CLANGVER=`echo $clang_version \ CLANGVER=`echo $clang_version \
| $AWK -F. '{ print \$1*10000+(\$2<100?\$2:99)*100+(\$3<100?\$3:99) }'` | $AWK -F. '{ print \$1*10000+(\$2<100?\$2:99)*100+(\$3<100?\$3:99) }'`
if test "$CLANGVER" -ge 50002; then if test "$CLANGVER" -ge 50002; then
AC_MSG_RESULT([yes ($clang_version)]) AC_MSG_RESULT([yes ($clang_version)])
else 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]) AC_MSG_ERROR(["$CLANG_FULL_VERSION" is too old or unrecognized, must be at least Clang 5.0.2])
fi fi
AC_DEFINE_UNQUOTED(CLANG_VERSION,$CLANGVER) AC_DEFINE_UNQUOTED(CLANG_VERSION,$CLANGVER)
AC_DEFINE_UNQUOTED(CLANG_FULL_VERSION,$CLANG_FULL_VERSION)
fi fi
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment