solenv/gbuild/platform/com_GCC_defs.mk | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
New commits: commit e37a4598bbfcc4359fb13e362888b5fe29a997ef Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Tue Jan 24 13:09:42 2023 +0200 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Tue Jan 24 15:11:49 2023 +0000 Use PYTHONWARNINGS=ignore instead of 'default' for Emscripten The Emscripten compiler, emcc is a Python script that wraps the actual compiler. It outputs annoying warnings like .../emscripten/tools/building.py:638: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/emscripten_temp_0fvvg__1/conftest.js.jso.js' mode='w' encoding='utf-8'> to stderr. (Ditto for em++.) Some steps in typical configure script think that a non-empty stderr means there was a problem in compiling a test program. This happens even for a microscopic test program with an option like -Werror which surely *is* supported. Avoid this by setting PYTHONWARNINGS=ignore. Change-Id: I11927fc7dccaa65a239ba65dfc7c6bb7487bf12d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146070 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <t...@collabora.com> diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 0cbe852539c9..3a14e841bc97 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -275,9 +275,16 @@ endif ifeq ($(COMPILER_PLUGINS_DEBUG),TRUE) gb_COMPILER_PLUGINS += -Xclang -plugin-arg-loplugin -Xclang --debug endif -# set CCACHE_CPP2=1 to prevent clang generating spurious warnings -# clear PYTHONWARNINGS to prevent noise from emscripten implementation -gb_COMPILER_SETUP += CCACHE_CPP2=1 $(if $(filter EMSCRIPTEN,$(OS)),PYTHONWARNINGS=default) + +# Set CCACHE_CPP2=1 to prevent Clang generating spurious warnings. + +# For Emscripten, the emcc command is a Python script that outputs annoying warnings like +# .../emscripten/tools/building.py:638: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/emscripten_temp_0fvvg__1/conftest.js.jso.js' mode='w' encoding='utf-8'> +# into stderr, which makes the configure script think that there is a problem in +# compiling even a microscopic test program with an option like -Werror which +# surely *is* supported. Avoid this by setting PYTHONWARNINGS=ignore. + +gb_COMPILER_SETUP += CCACHE_CPP2=1 $(if $(filter EMSCRIPTEN,$(OS)),PYTHONWARNINGS=ignore) gb_COMPILER_PLUGINS_SETUP := ICECC_EXTRAFILES=$(SRCDIR)/include/sal/log-areas.dox CCACHE_EXTRAFILES=$(SRCDIR)/include/sal/log-areas.dox SCCACHE_EXTRAFILES=$(SRCDIR)/include/sal/log-areas.dox gb_COMPILER_PLUGINS_WARNINGS_AS_ERRORS := \ -Xclang -plugin-arg-loplugin -Xclang --warnings-as-errors