Bug 903663: Use MOZ_C_SUPPORTS_WARNING and MOZ_CXX_SUPPORTS_WARNING to exempt warnings from FAIL_ON_WARNINGS. r=glandium

This commit is contained in:
Daniel Holbert 2013-08-13 07:22:10 -07:00
parent 6af1b24b3b
commit 779fc993a7
2 changed files with 18 additions and 10 deletions

View File

@ -1255,11 +1255,6 @@ if test "$GNU_CC"; then
fi
fi
WARNINGS_AS_ERRORS='-Werror'
# Don't treat -Wuninitialized as error b/c it has lots of false positives.
WARNINGS_AS_ERRORS="$WARNINGS_AS_ERRORS -Wno-error=uninitialized"
# Don't treat -Wdeprecated-declarations as error b/c we don't want our
# builds held hostage when a platform-specific API is suddenly deprecated.
WARNINGS_AS_ERRORS="$WARNINGS_AS_ERRORS -Wno-error=deprecated-declarations"
DSO_CFLAGS=''
DSO_PIC_CFLAGS='-fPIC'
ASFLAGS="$ASFLAGS -fPIC"
@ -6998,6 +6993,15 @@ MOZ_ARG_ENABLE_BOOL(warnings-as-errors,
MOZ_ENABLE_WARNINGS_AS_ERRORS=)
if test -z "$MOZ_ENABLE_WARNINGS_AS_ERRORS"; then
WARNINGS_AS_ERRORS=''
elif test "$GNU_CC"; then
# Prevent the following GCC warnings from being treated as errors:
# -Wuninitialized - too many false positives
# -Wdeprecated-declarations - we don't want our builds held hostage when a
# platform-specific API becomes deprecated.
MOZ_C_SUPPORTS_WARNING(-W, no-error=uninitialized, ac_c_has_noerror_uninitialized)
MOZ_CXX_SUPPORTS_WARNING(-W, no-error=uninitialized, ac_cxx_has_noerror_uninitialized)
MOZ_C_SUPPORTS_WARNING(-W, no-error=deprecated-declarations, ac_c_has_noerror_deprecated_declarations)
MOZ_CXX_SUPPORTS_WARNING(-W, no-error=deprecated-declarations, ac_cxx_has_noerror_deprecated_declarations)
fi
dnl ========================================================

View File

@ -1066,11 +1066,6 @@ if test "$GNU_CC"; then
fi
fi
WARNINGS_AS_ERRORS='-Werror'
# Don't treat -Wuninitialized as error b/c it has lots of false positives.
WARNINGS_AS_ERRORS="$WARNINGS_AS_ERRORS -Wno-error=uninitialized"
# Don't treat -Wdeprecated-declarations as error b/c we don't want our
# builds held hostage when a platform-specific API is suddenly deprecated.
WARNINGS_AS_ERRORS="$WARNINGS_AS_ERRORS -Wno-error=deprecated-declarations"
DSO_CFLAGS=''
DSO_PIC_CFLAGS='-fPIC'
ASFLAGS="$ASFLAGS -fPIC"
@ -3265,6 +3260,15 @@ MOZ_ARG_DISABLE_BOOL(warnings-as-errors,
MOZ_ENABLE_WARNINGS_AS_ERRORS=)
if test -z "$MOZ_ENABLE_WARNINGS_AS_ERRORS"; then
WARNINGS_AS_ERRORS=''
elif test "$GNU_CC"; then
# Prevent the following GCC warnings from being treated as errors:
# -Wuninitialized - too many false positives
# -Wdeprecated-declarations - we don't want our builds held hostage when a
# platform-specific API becomes deprecated.
MOZ_C_SUPPORTS_WARNING(-W, no-error=uninitialized, ac_c_has_noerror_uninitialized)
MOZ_CXX_SUPPORTS_WARNING(-W, no-error=uninitialized, ac_cxx_has_noerror_uninitialized)
MOZ_C_SUPPORTS_WARNING(-W, no-error=deprecated-declarations, ac_c_has_noerror_deprecated_declarations)
MOZ_CXX_SUPPORTS_WARNING(-W, no-error=deprecated-declarations, ac_cxx_has_noerror_deprecated_declarations)
fi
dnl ========================================================