diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-02-14 16:28:53 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-02-14 19:24:32 +0100 |
commit | bce14e97a6dad7686643d094995433c77e4aee7e (patch) | |
tree | 1946fc03d5c062ae2fe77657b2847c42628e4cbf /configure.ac | |
parent | 62ac8333999c661432adb0a18245a399daa89dcb (diff) |
Prevent -Werror,-Wunknown-warning-option when building compilerplugins
...with --enable-werror (seen it fail with a local build against a locally
built Clang 5.0.2).
(bin/gen-boost-headers faces a similar dilemma with Clang needing to silence
-Wunknown-warning-option and GCC failing upon the silencing incantation. There,
we were able to hack around that with a preceding
#pragma GCC diagnostic ignored "-Wpragmas"
Here, the easiest approach appears to be a new COMPILER_PLUGINS_COM_IS_CLANG
analoguous to the existing COM_IS_CLANG.)
Change-Id: I9036261fdd238c8a020a1d88b4e75fd444f9e030
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88725
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 3fa8fc760e3f..e186f6d3eb73 100644 --- a/configure.ac +++ b/configure.ac @@ -7218,6 +7218,7 @@ if test "$COM_IS_CLANG" != "TRUE"; then fi fi +COMPILER_PLUGINS_COM_IS_CLANG= if test "$COM_IS_CLANG" = "TRUE"; then if test -n "$enable_compiler_plugins"; then compiler_plugins="$enable_compiler_plugins" @@ -7336,6 +7337,18 @@ if test "$COM_IS_CLANG" = "TRUE"; then LDFLAGS=$save_LDFLAGS LIBS="$save_LIBS" AC_LANG_POP([C++]) + + AC_MSG_CHECKING([whether the compiler for building compilerplugins is actually Clang]) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #ifndef __clang__ + you lose + #endif + int foo=42; + ]])], + [AC_MSG_RESULT([yes]) + COMPILER_PLUGINS_COM_IS_CLANG=TRUE], + [AC_MSG_RESULT([no])]) + AC_SUBST(COMPILER_PLUGINS_COM_IS_CLANG) fi else if test "$enable_compiler_plugins" = "yes"; then @@ -7343,6 +7356,7 @@ else fi fi AC_SUBST(COMPILER_PLUGINS) +AC_SUBST(COMPILER_PLUGINS_COM_IS_CLANG) AC_SUBST(COMPILER_PLUGINS_CXX) AC_SUBST(COMPILER_PLUGINS_CXXFLAGS) AC_SUBST(COMPILER_PLUGINS_CXX_LINKFLAGS) |