mirror of https://github.com/mpv-player/mpv
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:
parent
5a997b8195
commit
c56dfab597
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue