forked from mirrors/gecko-dev
Bug 1482583 - Suppress clang-cl warnings in some third-party directories. r=mshal
--HG-- extra : rebase_source : 68621ca3ad2565e173f3350744125993f85f49f3
This commit is contained in:
parent
bcf431f3d3
commit
b190c1c0b3
3 changed files with 24 additions and 9 deletions
|
|
@ -79,6 +79,9 @@ if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
|
||||||
# We allow warnings for third-party code that can be updated from upstream.
|
# We allow warnings for third-party code that can be updated from upstream.
|
||||||
AllowCompilerWarnings()
|
AllowCompilerWarnings()
|
||||||
|
|
||||||
|
if CONFIG['CC_TYPE'] == 'clang-cl':
|
||||||
|
CXXFLAGS += ['-Wno-unused-variable']
|
||||||
|
|
||||||
FINAL_LIBRARY = 'gkmedias'
|
FINAL_LIBRARY = 'gkmedias'
|
||||||
|
|
||||||
DEFINES['PACKAGE_VERSION'] = '"moz"'
|
DEFINES['PACKAGE_VERSION'] = '"moz"'
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ LOCAL_INCLUDES += ['/media/ffvpx']
|
||||||
AllowCompilerWarnings()
|
AllowCompilerWarnings()
|
||||||
|
|
||||||
# Suppress warnings in third-party code.
|
# Suppress warnings in third-party code.
|
||||||
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
|
if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
|
||||||
CFLAGS += [
|
CFLAGS += [
|
||||||
'-Wno-parentheses',
|
'-Wno-parentheses',
|
||||||
'-Wno-pointer-sign',
|
'-Wno-pointer-sign',
|
||||||
|
|
@ -61,22 +61,32 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
|
||||||
# XXX This does not seem to have any effect on some versions of GCC.
|
# XXX This does not seem to have any effect on some versions of GCC.
|
||||||
'-Wno-deprecated-declarations',
|
'-Wno-deprecated-declarations',
|
||||||
]
|
]
|
||||||
if CONFIG['CC_TYPE'] == 'clang':
|
if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
|
||||||
CFLAGS += [
|
CFLAGS += [
|
||||||
'-Wno-incompatible-pointer-types-discards-qualifiers',
|
'-Wno-absolute-value',
|
||||||
|
'-Wno-incompatible-pointer-types',
|
||||||
'-Wno-string-conversion',
|
'-Wno-string-conversion',
|
||||||
'-Wno-visibility',
|
'-Wno-visibility',
|
||||||
# Workaround for https://bugs.llvm.org/show_bug.cgi?id=26828#c4 :
|
|
||||||
'-ffreestanding',
|
|
||||||
]
|
]
|
||||||
|
if CONFIG['CC_TYPE'] == 'clang-cl':
|
||||||
|
CFLAGS += [
|
||||||
|
'-Wno-inconsistent-dllimport',
|
||||||
|
'-Wno-macro-redefined', # 'WIN32_LEAN_AND_MEAN' macro redefined
|
||||||
|
]
|
||||||
|
if CONFIG['CC_TYPE'] == 'clang':
|
||||||
|
CFLAGS += [
|
||||||
|
# Workaround for https://bugs.llvm.org/show_bug.cgi?id=26828#c4 :
|
||||||
|
'-ffreestanding',
|
||||||
|
]
|
||||||
else:
|
else:
|
||||||
CFLAGS += [
|
CFLAGS += [
|
||||||
'-Wno-discarded-qualifiers',
|
'-Wno-discarded-qualifiers',
|
||||||
'-Wno-maybe-uninitialized',
|
'-Wno-maybe-uninitialized',
|
||||||
]
|
]
|
||||||
# Force visibility of cpu and av_log symbols.
|
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
|
||||||
CFLAGS += ['-include', 'libavutil_visibility.h']
|
# Force visibility of cpu and av_log symbols.
|
||||||
elif CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
|
CFLAGS += ['-include', 'libavutil_visibility.h']
|
||||||
|
elif CONFIG['CC_TYPE'] == 'msvc':
|
||||||
CFLAGS += [
|
CFLAGS += [
|
||||||
'-wd4090', # 'return' : different 'const' qualifiers
|
'-wd4090', # 'return' : different 'const' qualifiers
|
||||||
'-wd4018', # '>' : signed/unsigned mismatch
|
'-wd4018', # '>' : signed/unsigned mismatch
|
||||||
|
|
@ -104,6 +114,7 @@ elif CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
|
||||||
'-wd4057', '-wd4204', '-wd4706', '-wd4305', '-wd4152', '-wd4324',
|
'-wd4057', '-wd4204', '-wd4706', '-wd4305', '-wd4152', '-wd4324',
|
||||||
'-we4013', '-wd4100', '-wd4214', '-wd4307', '-wd4273', '-wd4554',
|
'-we4013', '-wd4100', '-wd4214', '-wd4307', '-wd4273', '-wd4554',
|
||||||
]
|
]
|
||||||
|
if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
|
||||||
LOCAL_INCLUDES += ['/media/ffvpx/compat/atomics/win32']
|
LOCAL_INCLUDES += ['/media/ffvpx/compat/atomics/win32']
|
||||||
DEFINES['HAVE_AV_CONFIG_H'] = True
|
DEFINES['HAVE_AV_CONFIG_H'] = True
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
|
||||||
CFLAGS += ['-Wno-tautological-compare']
|
CFLAGS += ['-Wno-tautological-compare']
|
||||||
if CONFIG['CC_TYPE'] == 'clang-cl':
|
if CONFIG['CC_TYPE'] == 'clang-cl':
|
||||||
CFLAGS += [
|
CFLAGS += [
|
||||||
|
'-Wno-parentheses',
|
||||||
'-Wno-pointer-sign',
|
'-Wno-pointer-sign',
|
||||||
'-Wno-shift-op-parentheses',
|
'-Wno-shift-negative-value',
|
||||||
]
|
]
|
||||||
|
|
||||||
UNIFIED_SOURCES += [
|
UNIFIED_SOURCES += [
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue