diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2021-02-27 22:30:41 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-05-14 16:38:36 +0200 |
commit | 608dfb4c616c1413a768faa4c728d2d869d1aacf (patch) | |
tree | d5b827b7998f4952b1d3b82897863dfa5a50af9f | |
parent | odk: build examples with GCC with explicit -std=c++11 (diff) | |
download | core-608dfb4c616c1413a768faa4c728d2d869d1aacf.tar.gz core-608dfb4c616c1413a768faa4c728d2d869d1aacf.zip |
gbuild: don't use -Wunused-macros with sccache
In at least soltools, jurt and gperf generated files, build with GCC and
sccache 0.2.16-alpha.0 reports spurious -Werror=implicit-fallthrough=
due to comments and these go away by configuring sccache with
rewrite_includes_only = true.
But his results in
cc1: error: ‘-fdirectives-only’ is incompatible with ‘-Wunused-macros’
so disable that like for clang-with-icecream builds.
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111716
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 6fb9f368c6824a8ff7bc5bc5cf66fc2df7d055b7)
Change-Id: I6dec38e86aa6e22591d7a700a8daddf3fed88b16
(cherry picked from commit 11e39bcfac696752bbe64c6975ec4b87f3ca92b6)
-rw-r--r-- | solenv/gbuild/platform/com_GCC_defs.mk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 06351a0d863c..0af77d47157b 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -62,7 +62,7 @@ gb_CFLAGS_COMMON := \ -Wstrict-prototypes \ -Wundef \ -Wunreachable-code \ - $(if $(and $(COM_IS_CLANG),$(or $(findstring icecc,$(CC)),$(findstring icecc,$(CCACHE_PREFIX)))),,-Wunused-macros) \ + $(if $(or $(and $(COM_IS_CLANG),$(or $(findstring icecc,$(CC)),$(findstring icecc,$(CCACHE_PREFIX)))),$(findstring sccache,$(CC))),,-Wunused-macros) \ -finput-charset=UTF-8 \ -fmessage-length=0 \ -fno-common \ @@ -76,7 +76,7 @@ gb_CXXFLAGS_COMMON := \ -Wextra \ -Wundef \ -Wunreachable-code \ - $(if $(and $(COM_IS_CLANG),$(or $(findstring icecc,$(CC)),$(findstring icecc,$(CCACHE_PREFIX)))),,-Wunused-macros) \ + $(if $(or $(and $(COM_IS_CLANG),$(or $(findstring icecc,$(CXX)),$(findstring icecc,$(CCACHE_PREFIX)))),$(findstring sccache,$(CXX))),,-Wunused-macros) \ -finput-charset=UTF-8 \ -fmessage-length=0 \ -fno-common \ |