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['CPU_ARCH'] != '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 # We allow warnings for third-party code that can be updated from upstream.
26 AllowCompilerWarnings()
28 # Suppress warnings in third-party code.
35 '-Wno-unused-function',
36 # XXX This does not seem to have any effect on some versions of GCC.
37 '-Wno-deprecated-declarations',
39 if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
41 '-Wno-absolute-value',
42 '-Wno-incompatible-pointer-types',
43 '-Wno-string-conversion',
46 if CONFIG['CC_TYPE'] == 'clang-cl':
48 '-Wno-inconsistent-dllimport',
49 '-Wno-macro-redefined', # 'WIN32_LEAN_AND_MEAN' macro redefined
53 '-Wno-discarded-qualifiers',
54 '-Wno-maybe-uninitialized',
56 if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
57 # Force visibility of cpu and av_log symbols.
58 CFLAGS += ['-include', 'libavutil_visibility.h']
59 if CONFIG['CC_TYPE'] == 'clang-cl':
60 LOCAL_INCLUDES += ['/media/ffvpx/compat/atomics/win32']
61 DEFINES['HAVE_AV_CONFIG_H'] = True
63 if CONFIG['MOZ_DEBUG']:
64 # Enable all assertions in debug builds.
65 DEFINES['ASSERT_LEVEL'] = 2
66 elif not CONFIG['RELEASE_OR_BETA']:
67 # Enable fast assertions in opt builds of Nightly and Aurora.
68 DEFINES['ASSERT_LEVEL'] = 1
70 # Add libFuzzer configuration directives
71 include('/tools/fuzzing/libfuzzer-config.mozbuild')