[Mesa-dev] [PATCH 07/11] Clang should warn only about unused CFLAGS and CXXFLAGS on debug builds.
Kenneth Graunke
kenneth at whitecape.org
Fri Jan 11 18:42:30 PST 2013
On 01/11/2013 06:23 PM, Johannes Obermayr wrote:
> ---
> configure.ac | 6 ++++++
> 1 Datei geändert, 6 Zeilen hinzugefügt(+)
>
> diff --git a/configure.ac b/configure.ac
> index 5bbcf05..3893570 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1994,6 +1994,12 @@ dnl Restore LDFLAGS and CPPFLAGS
> LDFLAGS="$_SAVE_LDFLAGS"
> CPPFLAGS="$_SAVE_CPPFLAGS"
>
> +dnl Clang should warn only about unused CFLAGS and CXXFLAGS on debug builds
> +if test "x$acv_mesa_CLANG" = xyes && test "x$enable_debug" = xno; then
> + CFLAGS="$CFLAGS -Qunused-arguments"
> + CXXFLAGS="$CXXFLAGS -Qunused-arguments"
> +fi
> +
> dnl Add user CFLAGS and CXXFLAGS
> cflags="$CFLAGS"
> cxxflags="$CXXFLAGS"
I disagree - if Mesa's configure.ac is going to enable unrecognized
flags by default, then we should suppress this all the time. Otherwise
it's ridiculously hard to see any useful information like warnings/errors.
If we fix Mesa's configure.ac to not enable GCC-specific options on
Clang, then I don't think we ever want to set this (so clang will warn
on bogus user-supplied CFLAGS).
More information about the mesa-dev
mailing list