diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2020-07-09 16:35:48 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2020-07-09 16:38:44 -0700 |
commit | 501306557c6bb65007f384aa203999d1577d0e99 (patch) | |
tree | 8cc060a5acaf072084496192a3d242a194162020 /configure.ac | |
parent | 0fc8671d10ccab52d78afdaeb715bcc9e52c0ac0 (diff) | |
download | emacs-501306557c6bb65007f384aa203999d1577d0e99.tar.gz |
Speed up GCC 10.1 compilation in default Git builds
* configure.ac (nw): GCC 10.1 introduced warnings enabled by -fanalyzer
that slow down compilation considerably. Generate these warnings only
if --enable-gcc-warnings is explicitly given. Also, do not bother to
eliminate warnings that Gnulib’s revised manywarnings module no longer
generates.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac index 6ede6104d39..9fe1a0d32c1 100644 --- a/configure.ac +++ b/configure.ac @@ -1030,14 +1030,17 @@ AS_IF([test $gl_gcc_warnings = no], ;; esac AS_IF([test $gl_gcc_warnings = yes], - [WERROR_CFLAGS=-Werror]) + [WERROR_CFLAGS=-Werror], + [# Use -fanalyzer and related options only if --enable-gcc-warnings, + # as they slow GCC considerably. + nw="$nw -fanalyzer -Wno-analyzer-double-free -Wno-analyzer-malloc-leak" + nw="$nw -Wno-analyzer-null-dereference -Wno-analyzer-use-after-free"]) - nw="$nw -Wcast-align -Wcast-align=strict" # Emacs is tricky with pointers. + nw="$nw -Wcast-align=strict" # Emacs is tricky with pointers. nw="$nw -Wduplicated-branches" # Too many false alarms nw="$nw -Wformat-overflow=2" # False alarms due to GCC bug 80776 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings nw="$nw -Woverlength-strings" # Not a problem these days - nw="$nw -Wformat-nonliteral" # we do this a lot nw="$nw -Wvla" # Emacs uses <vla.h>. nw="$nw -Wunused-const-variable=2" # lisp.h declares const objects. nw="$nw -Winline" # OK to ignore 'inline' @@ -1046,7 +1049,6 @@ AS_IF([test $gl_gcc_warnings = no], nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations nw="$nw -Wbad-function-cast" # These casts are no worse than others. - nw="$nw -Wabi" # Not useful, perceived as noise # Emacs doesn't care about shadowing; see # <https://lists.gnu.org/r/emacs-diffs/2011-11/msg00265.html>. @@ -1066,26 +1068,12 @@ AS_IF([test $gl_gcc_warnings = no], # option problematic. nw="$nw -Wsuggest-attribute=pure" - # This part is merely for shortening the command line, - # since -Wall implies -Wswitch. - nw="$nw -Wswitch" - - # This part is merely for shortening the command line, - # since -Wno-FOO needs to be added below regardless. - nw="$nw -Wmissing-field-initializers" - nw="$nw -Woverride-init" - nw="$nw -Wtype-limits" - nw="$nw -Wunused-parameter" - if test "$emacs_cv_clang" = yes; then - nw="$nw -Wcast-align" nw="$nw -Wdouble-promotion" - nw="$nw -Wmissing-braces" fi - # These cause too much noise in the MinGW build + # This causes too much noise in the MinGW build. if test $opsys = mingw32; then - nw="$nw -Wpointer-sign" nw="$nw -Wsuggest-attribute=format" fi |