1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 # Add assembler flags and includes
8 if CONFIG['TARGET_CPU'] != 'aarch64':
9 ASFLAGS += CONFIG['FFVPX_ASFLAGS']
10 ASFLAGS += ['-I%s/media/ffvpx/' % TOPSRCDIR]
11 ASFLAGS += ['-I%s/media/ffvpx/libavcodec/x86/' % TOPSRCDIR]
12 ASFLAGS += ['-I%s/media/ffvpx/libavutil/x86/' % TOPSRCDIR]
14 if CONFIG['FFVPX_ASFLAGS']:
15 if CONFIG['FFVPX_USE_NASM']:
18 if CONFIG['OS_ARCH'] == 'WINNT':
19 # Fix inline symbols and math defines for windows.
20 DEFINES['_USE_MATH_DEFINES'] = True
21 DEFINES['inline'] = "__inline"
23 LOCAL_INCLUDES += ['/media/ffvpx']
25 USE_LIBS += [ 'gkcodecs' ]
27 # We allow warnings for third-party code that can be updated from upstream.
28 AllowCompilerWarnings()
30 # Suppress warnings in third-party code.
37 '-Wno-unused-function',
38 # XXX This does not seem to have any effect on some versions of GCC.
39 '-Wno-deprecated-declarations',
41 if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
43 '-Wno-absolute-value',
44 '-Wno-incompatible-pointer-types',
45 '-Wno-string-conversion',
48 if CONFIG['CC_TYPE'] == 'clang-cl':
50 '-Wno-inconsistent-dllimport',
51 '-Wno-macro-redefined', # 'WIN32_LEAN_AND_MEAN' macro redefined
55 '-Wno-discarded-qualifiers',
56 '-Wno-maybe-uninitialized',
58 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
59 # Force visibility of cpu and av_log symbols.
60 CFLAGS += ['-include', 'libavutil_visibility.h']
61 if CONFIG['CC_TYPE'] == 'clang-cl':
62 LOCAL_INCLUDES += ['/media/ffvpx/compat/atomics/win32']
63 DEFINES['HAVE_AV_CONFIG_H'] = True
65 if CONFIG['MOZ_DEBUG']:
66 # Enable all assertions in debug builds.
67 DEFINES['ASSERT_LEVEL'] = 2
68 elif not CONFIG['RELEASE_OR_BETA']:
69 # Enable fast assertions in opt builds of Nightly and Aurora.
70 DEFINES['ASSERT_LEVEL'] = 1
72 # Add libFuzzer configuration directives
73 include('/tools/fuzzing/libfuzzer-config.mozbuild')