summaryrefslogtreecommitdiffstats
path: root/media/ffvpx/ffvpxcommon.mozbuild
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /media/ffvpx/ffvpxcommon.mozbuild
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'media/ffvpx/ffvpxcommon.mozbuild')
-rw-r--r--media/ffvpx/ffvpxcommon.mozbuild73
1 files changed, 73 insertions, 0 deletions
diff --git a/media/ffvpx/ffvpxcommon.mozbuild b/media/ffvpx/ffvpxcommon.mozbuild
new file mode 100644
index 0000000000..bf46fb5d83
--- /dev/null
+++ b/media/ffvpx/ffvpxcommon.mozbuild
@@ -0,0 +1,73 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+# Add assembler flags and includes
+if CONFIG['TARGET_CPU'] != 'aarch64':
+ ASFLAGS += CONFIG['FFVPX_ASFLAGS']
+ ASFLAGS += ['-I%s/media/ffvpx/' % TOPSRCDIR]
+ ASFLAGS += ['-I%s/media/ffvpx/libavcodec/x86/' % TOPSRCDIR]
+ ASFLAGS += ['-I%s/media/ffvpx/libavutil/x86/' % TOPSRCDIR]
+
+if CONFIG['FFVPX_ASFLAGS']:
+ if CONFIG['FFVPX_USE_NASM']:
+ USE_NASM = True
+
+ if CONFIG['OS_ARCH'] == 'WINNT':
+ # Fix inline symbols and math defines for windows.
+ DEFINES['_USE_MATH_DEFINES'] = True
+ DEFINES['inline'] = "__inline"
+
+LOCAL_INCLUDES += ['/media/ffvpx']
+
+USE_LIBS += [ 'gkcodecs' ]
+
+# We allow warnings for third-party code that can be updated from upstream.
+AllowCompilerWarnings()
+
+# Suppress warnings in third-party code.
+CFLAGS += [
+ '-Wno-parentheses',
+ '-Wno-pointer-sign',
+ '-Wno-sign-compare',
+ '-Wno-switch',
+ '-Wno-type-limits',
+ '-Wno-unused-function',
+ # XXX This does not seem to have any effect on some versions of GCC.
+ '-Wno-deprecated-declarations',
+]
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
+ CFLAGS += [
+ '-Wno-absolute-value',
+ '-Wno-incompatible-pointer-types',
+ '-Wno-string-conversion',
+ '-Wno-visibility',
+ ]
+ if CONFIG['CC_TYPE'] == 'clang-cl':
+ CFLAGS += [
+ '-Wno-inconsistent-dllimport',
+ '-Wno-macro-redefined', # 'WIN32_LEAN_AND_MEAN' macro redefined
+ ]
+else:
+ CFLAGS += [
+ '-Wno-discarded-qualifiers',
+ '-Wno-maybe-uninitialized',
+ ]
+if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
+ # Force visibility of cpu and av_log symbols.
+ CFLAGS += ['-include', 'libavutil_visibility.h']
+if CONFIG['CC_TYPE'] == 'clang-cl':
+ LOCAL_INCLUDES += ['/media/ffvpx/compat/atomics/win32']
+DEFINES['HAVE_AV_CONFIG_H'] = True
+
+if CONFIG['MOZ_DEBUG']:
+ # Enable all assertions in debug builds.
+ DEFINES['ASSERT_LEVEL'] = 2
+elif not CONFIG['RELEASE_OR_BETA']:
+ # Enable fast assertions in opt builds of Nightly and Aurora.
+ DEFINES['ASSERT_LEVEL'] = 1
+
+# Add libFuzzer configuration directives
+include('/tools/fuzzing/libfuzzer-config.mozbuild')