diff options
Diffstat (limited to 'webrtc/build')
-rw-r--r-- | webrtc/build/android/AndroidManifest.xml | 14 | ||||
-rw-r--r-- | webrtc/build/android/suppressions.xml | 23 | ||||
-rwxr-xr-x | webrtc/build/android/test_runner.py | 4 | ||||
-rw-r--r-- | webrtc/build/apk_test.gypi | 40 | ||||
-rw-r--r-- | webrtc/build/apk_tests.gyp | 31 | ||||
-rw-r--r-- | webrtc/build/apk_tests_noop.gyp | 8 | ||||
-rw-r--r-- | webrtc/build/common.gypi | 28 | ||||
-rw-r--r-- | webrtc/build/protoc.gypi | 22 | ||||
-rw-r--r-- | webrtc/build/sanitizers/tsan_suppressions_webrtc.cc | 9 | ||||
-rw-r--r-- | webrtc/build/webrtc.gni | 13 |
10 files changed, 148 insertions, 44 deletions
diff --git a/webrtc/build/android/AndroidManifest.xml b/webrtc/build/android/AndroidManifest.xml new file mode 100644 index 0000000000..bb6d354fef --- /dev/null +++ b/webrtc/build/android/AndroidManifest.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + This is a dummy manifest which is required by: + 1. aapt when generating R.java in java.gypi: + Nothing in the manifest is used, but it is still required by aapt. + 2. lint: [min|target]SdkVersion are required by lint and should + be kept up-to-date. +--> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="dummy.package"> + + <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="23" /> + +</manifest> diff --git a/webrtc/build/android/suppressions.xml b/webrtc/build/android/suppressions.xml new file mode 100644 index 0000000000..0fc22e0813 --- /dev/null +++ b/webrtc/build/android/suppressions.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<lint> + <!-- These lint settings is for the Android linter that gets run by + lint_action.gypi on compile of WebRTC java code. All WebRTC java code + should lint cleanly for the issues below. --> + <!-- TODO(phoglund): make work with suppress.py or remove printout referring + to suppress.py. --> + <issue id="NewApi"></issue> + + <issue id="Locale" severity="ignore"/> + <issue id="SdCardPath" severity="ignore"/> + <issue id="UseValueOf" severity="ignore"/> + <issue id="InlinedApi" severity="ignore"/> + <issue id="DefaultLocale" severity="ignore"/> + <issue id="Assert" severity="ignore"/> + <issue id="UseSparseArrays" severity="ignore"/> + + <!-- These are just from the dummy AndroidManifest.xml we use for linting. + It's in the same directory as this file. --> + <issue id="MissingApplicationIcon" severity="ignore"/> + <issue id="AllowBackup" severity="ignore"/> + <issue id="MissingVersion" severity="ignore"/> +</lint> diff --git a/webrtc/build/android/test_runner.py b/webrtc/build/android/test_runner.py index 799698201b..78a7a190b2 100755 --- a/webrtc/build/android/test_runner.py +++ b/webrtc/build/android/test_runner.py @@ -38,6 +38,8 @@ def main(): 'webrtc/common_audio/common_audio_unittests.isolate', 'common_video_unittests': 'webrtc/common_video/common_video_unittests.isolate', + 'libjingle_peerconnection_unittest': + 'talk/libjingle_peerconnection_unittest.isolate', 'modules_tests': 'webrtc/modules/modules_tests.isolate', 'modules_unittests': 'webrtc/modules/modules_unittests.isolate', 'rtc_unittests': 'webrtc/rtc_unittests.isolate', @@ -48,8 +50,6 @@ def main(): 'video_capture_tests': 'webrtc/modules/video_capture/video_capture_tests.isolate', 'video_engine_tests': 'webrtc/video_engine_tests.isolate', - 'video_engine_core_unittests': - 'webrtc/video_engine/video_engine_core_unittests.isolate', 'voice_engine_unittests': 'webrtc/voice_engine/voice_engine_unittests.isolate', 'webrtc_nonparallel_tests': 'webrtc/webrtc_nonparallel_tests.isolate', diff --git a/webrtc/build/apk_test.gypi b/webrtc/build/apk_test.gypi new file mode 100644 index 0000000000..a41e436a48 --- /dev/null +++ b/webrtc/build/apk_test.gypi @@ -0,0 +1,40 @@ +# Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. +# +# Use of this source code is governed by a BSD-style license +# that can be found in the LICENSE file in the root of the source +# tree. An additional intellectual property rights grant can be found +# in the file PATENTS. All contributing project authors may +# be found in the AUTHORS file in the root of the source tree. + +# This is almost an identical copy of src/build/apk_test.gypi with minor +# modifications to allow test executables starting with "lib". +# See http://crbug.com/543820 for more details. + +{ + 'dependencies': [ + '<(DEPTH)/base/base.gyp:base_java', + '<(DEPTH)/build/android/pylib/device/commands/commands.gyp:chromium_commands', + '<(DEPTH)/build/android/pylib/remote/device/dummy/dummy.gyp:remote_device_dummy_apk', + '<(DEPTH)/testing/android/appurify_support.gyp:appurify_support_java', + '<(DEPTH)/testing/android/on_device_instrumentation.gyp:reporter_java', + '<(DEPTH)/tools/android/android_tools.gyp:android_tools', + ], + 'conditions': [ + ['OS == "android"', { + 'variables': { + # These are used to configure java_apk.gypi included below. + 'test_type': 'gtest', + 'apk_name': '<(test_suite_name)', + 'intermediate_dir': '<(PRODUCT_DIR)/<(test_suite_name)_apk', + 'final_apk_path': '<(intermediate_dir)/<(test_suite_name)-debug.apk', + 'java_in_dir': '<(DEPTH)/testing/android/native_test/java', + 'native_lib_target': '<(test_suite_name)', + 'gyp_managed_install': 0, + }, + 'includes': [ + '../../build/java_apk.gypi', + '../../build/android/test_runner.gypi', + ], + }], # 'OS == "android" + ], # conditions +} diff --git a/webrtc/build/apk_tests.gyp b/webrtc/build/apk_tests.gyp index a3833ff524..02a13421f9 100644 --- a/webrtc/build/apk_tests.gyp +++ b/webrtc/build/apk_tests.gyp @@ -61,6 +61,23 @@ ], }, { + 'target_name': 'libjingle_peerconnection_unittest_apk', + 'type': 'none', + 'variables': { + 'test_suite_name': 'libjingle_peerconnection_unittest', + 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)libjingle_peerconnection_unittest<(SHARED_LIB_SUFFIX)', + }, + 'dependencies': [ + '<(DEPTH)/talk/libjingle_tests.gyp:libjingle_peerconnection_unittest', + '<(DEPTH)/talk/libjingle.gyp:libjingle_peerconnection_java', + ], + 'includes': [ + # Use webrtc copy of apk_test.gypi to allow test executables starting + # with "lib". See http://crbug.com/543820 for more details. + '../build/apk_test.gypi', + ], + }, + { 'target_name': 'modules_tests_apk', 'type': 'none', 'variables': { @@ -146,20 +163,6 @@ ], }, { - 'target_name': 'video_engine_core_unittests_apk', - 'type': 'none', - 'variables': { - 'test_suite_name': 'video_engine_core_unittests', - 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)video_engine_core_unittests<(SHARED_LIB_SUFFIX)', - }, - 'dependencies': [ - '<(webrtc_root)/video_engine/video_engine_core_unittests.gyp:video_engine_core_unittests', - ], - 'includes': [ - '../../build/apk_test.gypi', - ], - }, - { 'target_name': 'video_engine_tests_apk', 'type': 'none', 'variables': { diff --git a/webrtc/build/apk_tests_noop.gyp b/webrtc/build/apk_tests_noop.gyp index 719bddb854..ed9249aec5 100644 --- a/webrtc/build/apk_tests_noop.gyp +++ b/webrtc/build/apk_tests_noop.gyp @@ -22,6 +22,10 @@ 'type': 'none', }, { + 'target_name': 'libjingle_peerconnection_unittest_apk', + 'type': 'none', + }, + { 'target_name': 'modules_tests_apk', 'type': 'none', }, @@ -46,10 +50,6 @@ 'type': 'none', }, { - 'target_name': 'video_engine_core_unittests_apk', - 'type': 'none', - }, - { 'target_name': 'video_engine_tests_apk', 'type': 'none', }, diff --git a/webrtc/build/common.gypi b/webrtc/build/common.gypi index 2b0516863e..8d8583f9a4 100644 --- a/webrtc/build/common.gypi +++ b/webrtc/build/common.gypi @@ -21,12 +21,10 @@ 'conditions': [ ['build_with_chromium==1', { - 'build_with_libjingle': 1, 'webrtc_root%': '<(DEPTH)/third_party/webrtc', 'apk_tests_path%': '<(DEPTH)/third_party/webrtc/build/apk_tests_noop.gyp', 'modules_java_gyp_path%': '<(DEPTH)/third_party/webrtc/modules/modules_java_chromium.gyp', }, { - 'build_with_libjingle%': 0, 'webrtc_root%': '<(DEPTH)/webrtc', 'apk_tests_path%': '<(DEPTH)/webrtc/build/apk_tests.gyp', 'modules_java_gyp_path%': '<(DEPTH)/webrtc/modules/modules_java.gyp', @@ -34,7 +32,6 @@ ], }, 'build_with_chromium%': '<(build_with_chromium)', - 'build_with_libjingle%': '<(build_with_libjingle)', 'webrtc_root%': '<(webrtc_root)', 'apk_tests_path%': '<(apk_tests_path)', 'modules_java_gyp_path%': '<(modules_java_gyp_path)', @@ -47,7 +44,6 @@ 'build_with_mozilla%': 0, }, 'build_with_chromium%': '<(build_with_chromium)', - 'build_with_libjingle%': '<(build_with_libjingle)', 'build_with_mozilla%': '<(build_with_mozilla)', 'webrtc_root%': '<(webrtc_root)', 'apk_tests_path%': '<(apk_tests_path)', @@ -89,15 +85,14 @@ # Disable these to not build components which can be externally provided. 'build_expat%': 1, - 'build_icu%': 1, 'build_json%': 1, 'build_libjpeg%': 1, 'build_libvpx%': 1, 'build_libyuv%': 1, 'build_openmax_dl%': 1, 'build_opus%': 1, + 'build_protobuf%': 1, 'build_ssl%': 1, - 'build_vp9%': 1, # Disable by default 'have_dbus_glib%': 0, @@ -129,6 +124,17 @@ # Enabling this may break interop with Android clients that support H264. 'use_objc_h264%': 0, + # Enable this to build H.264 encoder/decoder using third party libraries. + # Encoding uses OpenH264 and decoding uses FFmpeg. Because of this, OpenH264 + # and FFmpeg have to be correctly enabled separately. + # - use_openh264=1 is required for OpenH264 targets to be defined. + # - ffmpeg_branding=Chrome is one way to support H.264 decoding in FFmpeg. + # FFmpeg can be built with/without H.264 support, see 'ffmpeg_branding'. + # Without it, it compiles but H264DecoderImpl fails to initialize. + # CHECK THE OPENH264, FFMPEG AND H.264 LICENSES/PATENTS BEFORE BUILDING. + # http://www.openh264.org, https://www.ffmpeg.org/ + 'use_third_party_h264%': 0, # TODO(hbos): To be used in follow-up CL(s). + 'conditions': [ ['build_with_chromium==1', { # Exclude pulse audio on Chromium since its prerequisites don't require @@ -137,6 +143,10 @@ # Exclude internal ADM since Chromium uses its own IO handling. 'include_internal_audio_device%': 0, + + # Remove tests for Chromium to avoid slowing down GYP generation. + 'include_tests%': 0, + 'restrict_webrtc_logging%': 1, }, { # Settings for the standalone (not-in-Chromium) build. # TODO(andrew): For now, disable the Chrome plugins, which causes a # flood of chromium-style warnings. Investigate enabling them: @@ -145,17 +155,11 @@ 'include_pulse_audio%': 1, 'include_internal_audio_device%': 1, - }], - ['build_with_libjingle==1', { - 'include_tests%': 0, - 'restrict_webrtc_logging%': 1, - }, { 'include_tests%': 1, 'restrict_webrtc_logging%': 0, }], ['OS=="ios"', { 'build_libjpeg%': 0, - 'enable_protobuf%': 0, }], ['target_arch=="arm" or target_arch=="arm64"', { 'prefer_fixed_point%': 1, diff --git a/webrtc/build/protoc.gypi b/webrtc/build/protoc.gypi index 5e486f16c2..682bc22cc5 100644 --- a/webrtc/build/protoc.gypi +++ b/webrtc/build/protoc.gypi @@ -109,10 +109,6 @@ 'process_outputs_as_sources': 1, }, ], - 'dependencies': [ - '<(DEPTH)/third_party/protobuf/protobuf.gyp:protoc#host', - '<(DEPTH)/third_party/protobuf/protobuf.gyp:protobuf_lite', - ], 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)/protoc_out', '<(DEPTH)', @@ -123,12 +119,20 @@ '<(DEPTH)', ] }, - 'export_dependent_settings': [ - # The generated headers reference headers within protobuf_lite, - # so dependencies must be able to find those headers too. - '<(DEPTH)/third_party/protobuf/protobuf.gyp:protobuf_lite', - ], # This target exports a hard dependency because it generates header # files. 'hard_dependency': 1, + 'conditions': [ + ['build_protobuf==1', { + 'dependencies': [ + '<(DEPTH)/third_party/protobuf/protobuf.gyp:protoc#host', + '<(DEPTH)/third_party/protobuf/protobuf.gyp:protobuf_lite', + ], + 'export_dependent_settings': [ + # The generated headers reference headers within protobuf_lite, + # so dependencies must be able to find those headers too. + '<(DEPTH)/third_party/protobuf/protobuf.gyp:protobuf_lite', + ], + }], + ], } diff --git a/webrtc/build/sanitizers/tsan_suppressions_webrtc.cc b/webrtc/build/sanitizers/tsan_suppressions_webrtc.cc index 4022160b52..115099099f 100644 --- a/webrtc/build/sanitizers/tsan_suppressions_webrtc.cc +++ b/webrtc/build/sanitizers/tsan_suppressions_webrtc.cc @@ -42,6 +42,10 @@ char kTSanDefaultSuppressions[] = "race:webrtc/modules/audio_processing/aec/aec_core.c\n" "race:webrtc/modules/audio_processing/aec/aec_rdft.c\n" +// Race in pulse initialization. +// https://code.google.com/p/webrtc/issues/detail?id=5152 +"race:webrtc::AudioDeviceLinuxPulse::Init\n" + // rtc_unittest // https://code.google.com/p/webrtc/issues/detail?id=3911 for details. "race:rtc::AsyncInvoker::OnMessage\n" @@ -68,6 +72,9 @@ char kTSanDefaultSuppressions[] = // TODO(jiayl): https://code.google.com/p/webrtc/issues/detail?id=3492 "race:user_sctp_timer_iterate\n" +// https://code.google.com/p/webrtc/issues/detail?id=5151 +"race:sctp_close\n" + // Potential deadlocks detected after roll in r6516. // https://code.google.com/p/webrtc/issues/detail?id=3509 "deadlock:webrtc::RTCPReceiver::SetSsrcs\n" @@ -85,7 +92,7 @@ char kTSanDefaultSuppressions[] = // Race between InitCpuFlags and TestCpuFlag in libyuv. // https://code.google.com/p/libyuv/issues/detail?id=508 -"race:libyuv::TestCpuFlag\n" +"race:InitCpuFlags\n" // End of suppressions. ; // Please keep this semicolon. diff --git a/webrtc/build/webrtc.gni b/webrtc/build/webrtc.gni index 1d33e892d7..c55f4230bd 100644 --- a/webrtc/build/webrtc.gni +++ b/webrtc/build/webrtc.gni @@ -36,7 +36,6 @@ declare_args() { # Disable these to not build components which can be externally provided. rtc_build_expat = true - rtc_build_icu = true rtc_build_json = true rtc_build_libjpeg = true rtc_build_libvpx = true @@ -44,7 +43,6 @@ declare_args() { rtc_build_openmax_dl = true rtc_build_opus = true rtc_build_ssl = true - rtc_build_vp9 = true # Disable by default. rtc_have_dbus_glib = false @@ -92,6 +90,17 @@ declare_args() { # Enable this to use HW H.264 encoder/decoder on iOS PeerConnections. # Enabling this may break interop with Android clients that support H264. rtc_use_objc_h264 = false + + # Enable this to build H.264 encoder/decoder using third party libraries. + # Encoding uses OpenH264 and decoding uses FFmpeg. Because of this, OpenH264 + # and FFmpeg have to be correctly enabled separately. + # - use_openh264=true is required for OpenH264 targets to be defined. + # - ffmpeg_branding="Chrome" is one way to support H.264 decoding in FFmpeg. + # FFmpeg can be built with/without H.264 support, see 'ffmpeg_branding'. + # Without it, it compiles but H264DecoderImpl fails to initialize. + # CHECK THE OPENH264, FFMPEG AND H.264 LICENSES/PATENTS BEFORE BUILDING. + # http://www.openh264.org, https://www.ffmpeg.org/ + use_third_party_h264 = false # TODO(hbos): To be used in follow-up CL(s). } # Make it possible to provide custom locations for some libraries (move these |