зеркало из https://github.com/mozilla/gecko-dev.git
Bug 750869 - Build system support for --enable-webrtc for Android (off by default). r=ted
This commit is contained in:
Родитель
58fb29ecd3
Коммит
7732931b5f
41
configure.in
41
configure.in
|
@ -5254,6 +5254,20 @@ if test -n "$MOZ_WEBRTC"; then
|
|||
MOZ_VP8=1
|
||||
MOZ_VP8_ENCODER=1
|
||||
MOZ_VP8_ERROR_CONCEALMENT=1
|
||||
|
||||
dnl OpenSLES is only available in Android 2.3 and later; we'll change this
|
||||
dnl hard dependency to a dynamic load with graceful runtime failure before
|
||||
dnl we make --enable-webrtc on by default in Android (bug 815905)
|
||||
dnl
|
||||
if test "$OS_TARGET" = "Android"; then
|
||||
LDFLAGS="$LDFLAGS -lOpenSLES"
|
||||
fi
|
||||
case "$target" in
|
||||
*-android*|*-linuxandroid*)
|
||||
LDFLAGS="$LDFLAGS -lOpenSLES"
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl enable once Signaling lands
|
||||
MOZ_WEBRTC_SIGNALING=1
|
||||
AC_DEFINE(MOZ_WEBRTC_SIGNALING)
|
||||
|
@ -8852,6 +8866,28 @@ echo $MAKEFILES > unallmakefiles
|
|||
|
||||
AC_OUTPUT($MAKEFILES)
|
||||
|
||||
# target_arch is from {ia32|x64|arm}
|
||||
case "$CPU_ARCH" in
|
||||
x86_64 | ia64)
|
||||
WEBRTC_TARGET_ARCH=x64
|
||||
;;
|
||||
|
||||
arm*)
|
||||
WEBRTC_TARGET_ARCH=arm
|
||||
;;
|
||||
|
||||
x86)
|
||||
WEBRTC_TARGET_ARCH=ia32
|
||||
;;
|
||||
|
||||
*)
|
||||
# unsupported arch for webrtc
|
||||
WEBRTC_TARGET_ARCH=unknown
|
||||
MOZ_WEBRTC=
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Generate Makefiles for WebRTC directly from .gyp files
|
||||
if test "${OS_TARGET}" = "WINNT"; then
|
||||
if test "$HAVE_64BIT_OS"; then
|
||||
|
@ -8860,6 +8896,9 @@ if test "${OS_TARGET}" = "WINNT"; then
|
|||
OS_BITS=32
|
||||
fi
|
||||
EXTRA_GYP_DEFINES="-D MSVS_VERSION=${_MSVS_VERSION} -D MSVS_OS_BITS=${OS_BITS}"
|
||||
|
||||
elif test "${OS_TARGET}" = "Android"; then
|
||||
EXTRA_GYP_DEFINES="-D gtest_target_type=executable -D android_toolchain=${android_toolchain} -G os=android "
|
||||
fi
|
||||
|
||||
if test -n "$MOZ_WEBRTC"; then
|
||||
|
@ -8869,7 +8908,7 @@ dnl Any --include files must also appear in -D FORCED_INCLUDE_FILE= entries
|
|||
dnl so that regeneration via dependencies works correctly
|
||||
WEBRTC_CONFIG="-D build_with_mozilla=1 --include ${srcdir}/media/webrtc/webrtc_config.gypi -D FORCED_INCLUDE_FILE=${srcdir}/media/webrtc/webrtc_config.gypi"
|
||||
|
||||
GYP_WEBRTC_OPTIONS="--format=mozmake ${WEBRTC_CONFIG} ${EXTRA_GYP_DEFINES} --depth=${srcdir}/media/webrtc/trunk --toplevel-dir=${srcdir} -G OBJDIR=${_objdir}"
|
||||
GYP_WEBRTC_OPTIONS="--format=mozmake ${WEBRTC_CONFIG} -D target_arch=${WEBRTC_TARGET_ARCH} ${EXTRA_GYP_DEFINES} --depth=${srcdir}/media/webrtc/trunk --toplevel-dir=${srcdir} -G OBJDIR=${_objdir}"
|
||||
|
||||
$PYTHON ${srcdir}/media/webrtc/trunk/build/gyp_chromium \
|
||||
$GYP_WEBRTC_OPTIONS \
|
||||
|
|
|
@ -28,13 +28,11 @@ WEBRTC_LIBS = \
|
|||
$(call EXPAND_LIBNAME_PATH,bitrate_controller,$(DEPTH)/media/webrtc/trunk/src/modules/modules_bitrate_controller) \
|
||||
$(call EXPAND_LIBNAME_PATH,remote_bitrate_estimator,$(DEPTH)/media/webrtc/trunk/src/modules/modules_remote_bitrate_estimator) \
|
||||
$(call EXPAND_LIBNAME_PATH,video_processing,$(DEPTH)/media/webrtc/trunk/src/modules/modules_video_processing) \
|
||||
$(call EXPAND_LIBNAME_PATH,video_processing_sse2,$(DEPTH)/media/webrtc/trunk/src/modules/modules_video_processing_sse2) \
|
||||
$(call EXPAND_LIBNAME_PATH,voice_engine_core,$(DEPTH)/media/webrtc/trunk/src/voice_engine/voice_engine_voice_engine_core) \
|
||||
$(call EXPAND_LIBNAME_PATH,audio_conference_mixer,$(DEPTH)/media/webrtc/trunk/src/modules/modules_audio_conference_mixer) \
|
||||
$(call EXPAND_LIBNAME_PATH,audio_device,$(DEPTH)/media/webrtc/trunk/src/modules/modules_audio_device) \
|
||||
$(call EXPAND_LIBNAME_PATH,audio_processing,$(DEPTH)/media/webrtc/trunk/src/modules/modules_audio_processing) \
|
||||
$(call EXPAND_LIBNAME_PATH,aec,$(DEPTH)/media/webrtc/trunk/src/modules/modules_aec) \
|
||||
$(call EXPAND_LIBNAME_PATH,aec_sse2,$(DEPTH)/media/webrtc/trunk/src/modules/modules_aec_sse2) \
|
||||
$(call EXPAND_LIBNAME_PATH,apm_util,$(DEPTH)/media/webrtc/trunk/src/modules/modules_apm_util) \
|
||||
$(call EXPAND_LIBNAME_PATH,aecm,$(DEPTH)/media/webrtc/trunk/src/modules/modules_aecm) \
|
||||
$(call EXPAND_LIBNAME_PATH,agc,$(DEPTH)/media/webrtc/trunk/src/modules/modules_agc) \
|
||||
|
@ -45,6 +43,16 @@ WEBRTC_LIBS = \
|
|||
$(call EXPAND_LIBNAME_PATH,nrappkit,$(DEPTH)/media/mtransport/third_party/nrappkit/nrappkit_nrappkit) \
|
||||
$(NULL)
|
||||
|
||||
# if we're on an intel arch, we want SSE2 optimizations
|
||||
ifneq (,$(INTEL_ARCHITECTURE))
|
||||
WEBRTC_LIBS += \
|
||||
$(call EXPAND_LIBNAME_PATH,video_processing_sse2,$(DEPTH)/media/webrtc/trunk/src/modules/modules_video_processing_sse2) \
|
||||
$(call EXPAND_LIBNAME_PATH,aec_sse2,$(DEPTH)/media/webrtc/trunk/src/modules/modules_aec_sse2) \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
|
||||
|
||||
# If you enable one of these codecs in webrtc_config.gypi, you'll need to re-add the
|
||||
# relevant library from this list:
|
||||
#
|
||||
|
|
|
@ -2224,18 +2224,22 @@
|
|||
],
|
||||
}],
|
||||
],
|
||||
# -mmmx allows mmintrin.h to be used for mmx intrinsics.
|
||||
# video playback is mmx and sse2 optimized.
|
||||
'cflags': [
|
||||
'-m32',
|
||||
'-mmmx',
|
||||
],
|
||||
'ldflags': [
|
||||
'-m32',
|
||||
],
|
||||
'cflags_mozilla': [
|
||||
'-m32',
|
||||
'-mmmx',
|
||||
'target_conditions': [
|
||||
['_toolset=="target" and OS!="android"', {
|
||||
# -mmmx allows mmintrin.h to be used for mmx intrinsics.
|
||||
# video playback is mmx and sse2 optimized.
|
||||
'cflags': [
|
||||
'-m32',
|
||||
'-mmmx',
|
||||
],
|
||||
'ldflags': [
|
||||
'-m32',
|
||||
],
|
||||
'cflags_mozilla': [
|
||||
'-m32',
|
||||
'-mmmx',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
],
|
||||
|
@ -2592,6 +2596,8 @@
|
|||
# TODO: The proper thing to do longer-tem would be proper gyp
|
||||
# support for a custom link command line.
|
||||
['_toolset=="target"', {
|
||||
'conditions': [
|
||||
['build_with_mozilla==0', {
|
||||
'cflags!': [
|
||||
'-pthread', # Not supported by Android toolchain.
|
||||
],
|
||||
|
@ -2605,12 +2611,6 @@
|
|||
'-Wa,--noexecstack',
|
||||
'<@(release_extra_cflags)',
|
||||
],
|
||||
'defines': [
|
||||
'ANDROID',
|
||||
'__GNU_SOURCE=1', # Necessary for clone()
|
||||
'USE_STLPORT=1',
|
||||
'_STLP_USE_PTR_SPECIALIZATIONS=1',
|
||||
],
|
||||
'ldflags!': [
|
||||
'-pthread', # Not supported by Android toolchain.
|
||||
],
|
||||
|
@ -2752,7 +2752,17 @@
|
|||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
|
||||
}], # build_with_mozilla== 0
|
||||
|
||||
],
|
||||
'defines': [
|
||||
'ANDROID',
|
||||
'__GNU_SOURCE=1', # Necessary for clone()
|
||||
'USE_STLPORT=1',
|
||||
'_STLP_USE_PTR_SPECIALIZATIONS=1',
|
||||
],
|
||||
}],
|
||||
# Settings for building host targets using the system toolchain.
|
||||
['_toolset=="host"', {
|
||||
'cflags!': [
|
||||
|
|
Загрузка…
Ссылка в новой задаче