diff options
author | Tor Lillqvist <tml@collabora.com> | 2023-01-24 13:09:42 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2023-01-24 15:11:49 +0000 |
commit | e37a4598bbfcc4359fb13e362888b5fe29a997ef (patch) | |
tree | ff10ae8004a8d2a78b568d03ee6bbd9704b247bf /solenv | |
parent | bc8c1d45ac91a1b3855eec8358260a8720d4c081 (diff) |
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 <tml@collabora.com>
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/platform/com_GCC_defs.mk | 13 |
1 files changed, 10 insertions, 3 deletions
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 |