0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

configure: clang: set custom warning flags for clang

Before there was no attempt to set warning flags sanely when compiling
with clang. Set some reasonable defaults that cut down noise and
enable various non-default warnings that are enabled with GCC too.
I'm not sure whether clang is supposed to support more of the options
now used with GCC - it accepts some of those options but they
apparently have no effect; I didn't find any real documentation about
the individual warnings.
This commit is contained in:
Uoti Urpala 2011-07-07 22:51:23 +03:00
parent 5a997b8195
commit c56dfab597

2
configure vendored
View File

@ -2319,6 +2319,8 @@ elif test -z "$CFLAGS" ; then
CFLAGS="-O2 $_march $_mcpu $_pipe -xc99 -xregs=frameptr"
elif test "$cc_vendor" = "clang"; then
CFLAGS="-O2 $_march $_pipe"
WARNFLAGS="-Wall -Wno-switch-enum -Wno-logical-op-parentheses -Wpointer-arith -Wundef -Wno-pointer-sign -Wmissing-prototypes"
ERRORFLAGS="-Werror=implicit-function-declaration"
elif test "$cc_vendor" != "gnu" ; then
CFLAGS="-O2 $_march $_mcpu $_pipe"
else