summaryrefslogtreecommitdiffstats
path: root/media/libvpx/moz.build
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /media/libvpx/moz.build
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'media/libvpx/moz.build')
-rw-r--r--media/libvpx/moz.build118
1 files changed, 118 insertions, 0 deletions
diff --git a/media/libvpx/moz.build b/media/libvpx/moz.build
new file mode 100644
index 000000000..10c3d7c29
--- /dev/null
+++ b/media/libvpx/moz.build
@@ -0,0 +1,118 @@
+# -*- 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/.
+
+with Files('*'):
+ BUG_COMPONENT = ('Core', 'Video/Audio')
+
+include('sources.mozbuild')
+
+EXPORTS.vpx += files['EXPORTS']
+
+SOURCES += files['SOURCES']
+
+if CONFIG['MOZ_VPX_ERROR_CONCEALMENT']:
+ SOURCES += files['ERROR_CONCEALMENT']
+
+if CONFIG['VPX_USE_YASM']:
+ USE_YASM = True
+
+if CONFIG['VPX_X86_ASM']:
+ SOURCES += files['X86_ASM']
+
+ if '64' in CONFIG['OS_TEST']:
+ SOURCES += files['X86-64_ASM']
+
+ #avx2 can be enabled on all supported compilters
+ SOURCES += files['AVX2']
+
+ #postproc is only enabled on x86 with asm
+ SOURCES += files['VP8_POSTPROC']
+
+arm_asm_files = []
+if CONFIG['VPX_ARM_ASM']:
+ arm_asm_files += files['ARM_ASM']
+
+ if CONFIG['VPX_AS_CONVERSION']:
+ SOURCES += sorted([
+ "!%s.s" % f if f.endswith('.asm') else f for f in arm_asm_files
+ ])
+ else:
+ SOURCES += sorted(arm_asm_files)
+
+ for f in SOURCES:
+ if f.endswith('.c') and 'neon' in f:
+ SOURCES[f].flags += CONFIG['VPX_ASFLAGS']
+
+ if CONFIG['OS_TARGET'] == 'Android':
+ # For cpu-features.h
+ LOCAL_INCLUDES += [
+ '%%%s/sources/android/cpufeatures' % CONFIG['ANDROID_NDK'],
+ ]
+ if CONFIG['CLANG_CXX']:
+ ASFLAGS += [
+ '-no-integrated-as',
+ ]
+
+# boolhuff_armv5te.asm defines the same functions as boolhuff.c instead of
+# using RTCD, so we have to make sure we only add one of the two.
+if 'vp8/encoder/arm/armv5te/boolhuff_armv5te.asm' not in arm_asm_files:
+ SOURCES += [
+ 'vp8/encoder/boolhuff.c',
+ ]
+
+# We allow warnings for third-party code that can be updated from upstream.
+ALLOW_COMPILER_WARNINGS = True
+
+FINAL_LIBRARY = 'gkmedias'
+
+DEFINES['HAVE_CONFIG_H'] = 'vpx_config.h'
+
+if CONFIG['OS_TARGET'] == 'Android':
+ # Older versions of the Android NDK don't pre-define anything to indicate
+ # the OS they're on, so do it for them.
+ DEFINES['__linux__'] = True
+
+ if not CONFIG['MOZ_WEBRTC']:
+ SOURCES += [
+ '%%%s/sources/android/cpufeatures/cpu-features.c' % CONFIG['ANDROID_NDK'],
+ ]
+
+if CONFIG['CLANG_CL'] or not CONFIG['_MSC_VER']:
+ for f in SOURCES:
+ if f.endswith('.c'):
+ if 'sse2' in f:
+ SOURCES[f].flags += CONFIG['SSE2_FLAGS']
+ if 'ssse3' in f:
+ SOURCES[f].flags += ['-mssse3']
+ if 'sse4' in f:
+ SOURCES[f].flags += ['-msse4.1']
+ if 'avx2' in f:
+ SOURCES[f].flags += ['-mavx2']
+
+# Suppress warnings in third-party code.
+if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
+ CFLAGS += [
+ '-Wno-sign-compare',
+ '-Wno-unused-function', # so many of these warnings; just ignore them
+ ]
+if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
+ CFLAGS += [
+ '-Wno-unreachable-code',
+ '-Wno-unneeded-internal-declaration',
+ ]
+
+ASFLAGS += CONFIG['VPX_ASFLAGS']
+ASFLAGS += [
+ '-I.',
+ '-I%s/media/libvpx/' % TOPSRCDIR,
+ '-I%s/media/libvpx/vpx_ports/' % TOPSRCDIR,
+]
+
+if CONFIG['OS_TARGET'] == 'Android':
+ # For LIBVPX_RAND
+ ASFLAGS += [
+ '-D__ANDROID__'
+ ]