Bug 1146204 - Build libopus in unified mode; r=cpearce
authorEhsan Akhgari <ehsan@mozilla.com>
Sun, 22 Mar 2015 20:55:20 -0400
changeset 263876 d193686b3d0ba07e052181a05ff8d993b413d594
parent 263875 f5957afe1f8d1b985efcaa9675f27d0460b52177
child 263877 dfe2490b2b2be3b2d0f2ba30a236e142057d01fa
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1146204
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1146204 - Build libopus in unified mode; r=cpearce
media/libopus/moz.build
media/libopus/sources.mozbuild
--- a/media/libopus/moz.build
+++ b/media/libopus/moz.build
@@ -65,33 +65,34 @@ LOCAL_INCLUDES += [
     'silk',
     'src',
 ]
 
 # sources.mozbuild is generated from gen-sources.py when a new libopus is
 # imported.
 include('sources.mozbuild')
 
-SOURCES += celt_sources
-SOURCES += silk_sources
-SOURCES += opus_sources
+UNIFIED_SOURCES += celt_sources
+SOURCES += celt_nonunified_sources
+UNIFIED_SOURCES += silk_sources
+UNIFIED_SOURCES += opus_sources
 
 if CONFIG['MOZ_SAMPLE_TYPE_FLOAT32']:
     LOCAL_INCLUDES += [
         'silk/float',
     ]
-    SOURCES += silk_sources_float
-    SOURCES += opus_sources_float
+    UNIFIED_SOURCES += silk_sources_float
+    UNIFIED_SOURCES += opus_sources_float
 else:
     LOCAL_INCLUDES += [
         'silk/fixed',
     ]
-    SOURCES += silk_sources_fixed
+    UNIFIED_SOURCES += silk_sources_fixed
 # for webrtc
-    SOURCES += opus_sources_float
+    UNIFIED_SOURCES += opus_sources_float
 
 if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_AS']:
     SOURCES += celt_sources_arm
     GENERATED_SOURCES += [ '%s.%s' % (f, CONFIG['ASM_SUFFIX']) for f in [
         'celt_pitch_xcorr_arm-gnu',
     ]]
     # -Os is significantly slower, enable -O3 unless optimization is disabled
     if CONFIG['MOZ_OPTIMIZE']:
--- a/media/libopus/sources.mozbuild
+++ b/media/libopus/sources.mozbuild
@@ -1,30 +1,35 @@
 # THIS FILE WAS AUTOMATICALLY GENERATED BY gen-sources.py. DO NOT EDIT.
 celt_sources = [
     'celt/bands.c',
     'celt/celt.c',
-    'celt/celt_decoder.c',
-    'celt/celt_encoder.c',
     'celt/celt_lpc.c',
     'celt/cwrs.c',
     'celt/entcode.c',
     'celt/entdec.c',
     'celt/entenc.c',
     'celt/kiss_fft.c',
     'celt/laplace.c',
     'celt/mathops.c',
     'celt/mdct.c',
     'celt/modes.c',
     'celt/pitch.c',
     'celt/quant_bands.c',
     'celt/rate.c',
     'celt/vq.c',
 ]
 
+celt_nonunified_sources = [
+    # Disabled because of name clash of opus_custom_encoder_get_size.
+    'celt/celt_decoder.c',
+    # Disabled because of name clash of opus_custom_encoder_get_size.
+    'celt/celt_encoder.c',
+]
+
 celt_sources_arm = [
     'celt/arm/arm_celt_map.c',
     'celt/arm/armcpu.c',
 ]
 
 celt_sources_arm_asm = [
     'celt/arm/celt_pitch_xcorr_arm.s',
 ]