DEPS: Specify WebRTC hooks and add a few dependencies

This removes the need of executing Chromium's runhooks.
A selection of hooks (not all) were picked that should be
sufficient for WebRTC's needs.

New dependencies:
* third_party/espresso
* third_party/javax_inject
* tools/clang_format_merge_driver

BUG=webrtc:5578, webrtc:5006, webrtc:6741

TESTED=
rm -rf third_party/android_tools/sdk/extras/google/m2repository/
gclient runhooks
Verified that third_party/android_tools/sdk/extras/google/m2repository/ is downloaded without any license prompt.
NOTRY=True

Review-Url: https://codereview.webrtc.org/2524673002
Cr-Commit-Position: refs/heads/master@{#15195}
This commit is contained in:
kjellander
2016-11-22 07:02:11 -08:00
committed by Commit bot
parent ab6996dc10
commit 24d812ddc1
5 changed files with 380 additions and 12 deletions

3
.gitignore vendored
View File

@ -93,6 +93,7 @@
/third_party/colorama
/third_party/cygwin
/third_party/directxsdk
/third_party/espresso
/third_party/expat
/third_party/ffmpeg
/third_party/gaeunit
@ -106,6 +107,7 @@
/third_party/instrumented_libraries
/third_party/intellij
/third_party/jsoncpp
/third_party/javax_inject
/third_party/jsr-305
/third_party/junit
/third_party/junit-jar
@ -148,6 +150,7 @@
/third_party/zlib
/tools/android
/tools/clang
/tools/clang_format_merge_driver
/tools/determinism
/tools/generate_library_loader
/tools/generate_stubs

338
DEPS
View File

@ -8,8 +8,6 @@ vars = {
'chromium_revision': '5e821a778b85878bafcc8128f64333fd518c79a5',
}
# NOTE: Use http rather than https; the latter can cause problems for users
# behind proxies.
deps = {
'src/third_party/gflags/src':
Var('chromium_git') + '/external/github.com/gflags/gflags@03bebcb065c83beff83d50ae025a55a4bf94dfca',
@ -62,14 +60,327 @@ hooks = [
],
},
{
# Pull sanitizer-instrumented third-party libraries if requested via
# GYP_DEFINES. This could be done as part of sync_chromium.py above
# but then we would need to run all the Chromium hooks each time,
# which will slow things down a lot.
'name': 'instrumented_libraries',
'pattern': '\\.sha1',
'action': ['python', 'src/third_party/instrumented_libraries/scripts/download_binaries.py'],
},
# Download Google Play Services SDK (without license prompt).
'name': 'google_play_services_download',
'pattern': '.',
'action': ['python', 'src/webrtc/build/google_play_services_download.py'],
},
# Android dependencies. Many are downloaded using Google Storage these days.
# They're copied from https://cs.chromium.org/chromium/src/DEPS for all
# such dependencies we share with Chromium.
{
'name': 'intellij',
'pattern': '.',
'action': ['python',
'src/build/android/update_deps/update_third_party_deps.py',
'download',
'-b', 'chromium-intellij',
'-l', 'third_party/intellij'
],
},
{
'name': 'javax_inject',
'pattern': '.',
'action': ['python',
'src/build/android/update_deps/update_third_party_deps.py',
'download',
'-b', 'chromium-javax-inject',
'-l', 'third_party/javax_inject'
],
},
{
'name': 'hamcrest',
'pattern': '.',
'action': ['python',
'src/build/android/update_deps/update_third_party_deps.py',
'download',
'-b', 'chromium-hamcrest',
'-l', 'third_party/hamcrest'
],
},
{
'name': 'guava',
'pattern': '.',
'action': ['python',
'src/build/android/update_deps/update_third_party_deps.py',
'download',
'-b', 'chromium-guava',
'-l', 'third_party/guava'
],
},
{
'name': 'android_support_test_runner',
'pattern': '.',
'action': ['python',
'src/build/android/update_deps/update_third_party_deps.py',
'download',
'-b', 'chromium-android-support-test-runner',
'-l', 'third_party/android_support_test_runner'
],
},
{
'name': 'byte_buddy',
'pattern': '.',
'action': ['python',
'src/build/android/update_deps/update_third_party_deps.py',
'download',
'-b', 'chromium-byte-buddy',
'-l', 'third_party/byte_buddy'
],
},
{
'name': 'espresso',
'pattern': '.',
'action': ['python',
'src/build/android/update_deps/update_third_party_deps.py',
'download',
'-b', 'chromium-espresso',
'-l', 'third_party/espresso'
],
},
{
'name': 'robolectric_libs',
'pattern': '.',
'action': ['python',
'src/build/android/update_deps/update_third_party_deps.py',
'download',
'-b', 'chromium-robolectric',
'-l', 'third_party/robolectric'
],
},
{
'name': 'apache_velocity',
'pattern': '.',
'action': ['python',
'src/build/android/update_deps/update_third_party_deps.py',
'download',
'-b', 'chromium-apache-velocity',
'-l', 'third_party/apache_velocity'
],
},
{
'name': 'ow2_asm',
'pattern': '.',
'action': ['python',
'src/build/android/update_deps/update_third_party_deps.py',
'download',
'-b', 'chromium-ow2-asm',
'-l', 'third_party/ow2_asm'
],
},
{
'name': 'icu4j',
'pattern': '.',
'action': ['python',
'src/build/android/update_deps/update_third_party_deps.py',
'download',
'-b', 'chromium-icu4j',
'-l', 'third_party/icu4j'
],
},
{
'name': 'accessibility_test_framework',
'pattern': '.',
'action': ['python',
'src/build/android/update_deps/update_third_party_deps.py',
'download',
'-b', 'chromium-accessibility-test-framework',
'-l', 'third_party/accessibility_test_framework'
],
},
{
'name': 'bouncycastle',
'pattern': '.',
'action': ['python',
'src/build/android/update_deps/update_third_party_deps.py',
'download',
'-b', 'chromium-bouncycastle',
'-l', 'third_party/bouncycastle'
],
},
{
'name': 'sqlite4java',
'pattern': '.',
'action': ['python',
'src/build/android/update_deps/update_third_party_deps.py',
'download',
'-b', 'chromium-sqlite4java',
'-l', 'third_party/sqlite4java'
],
},
{
'name': 'objenesis',
'pattern': '.',
'action': ['python',
'src/build/android/update_deps/update_third_party_deps.py',
'download',
'-b', 'chromium-objenesis',
'-l', 'third_party/objenesis'
],
},
{
# Downloads the current stable linux sysroot to build/linux/ if needed.
# This sysroot updates at about the same rate that the chrome build deps
# change. This script is a no-op except for linux users who are doing
# official chrome builds or cross compiling.
'name': 'sysroot',
'pattern': '.',
'action': ['python', 'src/build/linux/sysroot_scripts/install-sysroot.py',
'--running-as-hook'],
},
{
# Update the Windows toolchain if necessary.
'name': 'win_toolchain',
'pattern': '.',
'action': ['python', 'src/build/vs_toolchain.py', 'update'],
},
# Pull binutils for linux, enabled debug fission for faster linking /
# debugging when used with clang on Ubuntu Precise.
# https://code.google.com/p/chromium/issues/detail?id=352046
{
'name': 'binutils',
'pattern': 'src/third_party/binutils',
'action': [
'python',
'src/third_party/binutils/download.py',
],
},
{
# Pull clang if needed or requested via GYP_DEFINES.
# Note: On Win, this should run after win_toolchain, as it may use it.
'name': 'clang',
'pattern': '.',
'action': ['python', 'src/tools/clang/scripts/update.py', '--if-needed'],
},
# Pull GN binaries.
{
'name': 'gn_win',
'pattern': '.',
'action': [ 'download_from_google_storage',
'--no_resume',
'--platform=win32',
'--no_auth',
'--bucket', 'chromium-gn',
'-s', 'src/buildtools/win/gn.exe.sha1',
],
},
{
'name': 'gn_mac',
'pattern': '.',
'action': [ 'download_from_google_storage',
'--no_resume',
'--platform=darwin',
'--no_auth',
'--bucket', 'chromium-gn',
'-s', 'src/buildtools/mac/gn.sha1',
],
},
{
'name': 'gn_linux64',
'pattern': '.',
'action': [ 'download_from_google_storage',
'--no_resume',
'--platform=linux*',
'--no_auth',
'--bucket', 'chromium-gn',
'-s', 'src/buildtools/linux64/gn.sha1',
],
},
# Pull clang-format binaries using checked-in hashes.
{
'name': 'clang_format_win',
'pattern': '.',
'action': [ 'download_from_google_storage',
'--no_resume',
'--platform=win32',
'--no_auth',
'--bucket', 'chromium-clang-format',
'-s', 'src/buildtools/win/clang-format.exe.sha1',
],
},
{
'name': 'clang_format_mac',
'pattern': '.',
'action': [ 'download_from_google_storage',
'--no_resume',
'--platform=darwin',
'--no_auth',
'--bucket', 'chromium-clang-format',
'-s', 'src/buildtools/mac/clang-format.sha1',
],
},
{
'name': 'clang_format_linux',
'pattern': '.',
'action': [ 'download_from_google_storage',
'--no_resume',
'--platform=linux*',
'--no_auth',
'--bucket', 'chromium-clang-format',
'-s', 'src/buildtools/linux64/clang-format.sha1',
],
},
# Pull luci-go binaries (isolate, swarming) using checked-in hashes.
{
'name': 'luci-go_win',
'pattern': '.',
'action': [ 'download_from_google_storage',
'--no_resume',
'--platform=win32',
'--no_auth',
'--bucket', 'chromium-luci',
'-d', 'src/tools/luci-go/win64',
],
},
{
'name': 'luci-go_mac',
'pattern': '.',
'action': [ 'download_from_google_storage',
'--no_resume',
'--platform=darwin',
'--no_auth',
'--bucket', 'chromium-luci',
'-d', 'src/tools/luci-go/mac64',
],
},
{
'name': 'luci-go_linux',
'pattern': '.',
'action': [ 'download_from_google_storage',
'--no_resume',
'--platform=linux*',
'--no_auth',
'--bucket', 'chromium-luci',
'-d', 'src/tools/luci-go/linux64',
],
},
# Pull the Syzygy binaries, used for optimization and instrumentation.
{
'name': 'syzygy-binaries',
'pattern': '.',
'action': ['python',
'src/build/get_syzygy_binaries.py',
'--output-dir=src/third_party/syzygy/binaries',
'--revision=a8456d9248a126881dcfb8707ca7dcdae56e1ac7',
'--overwrite',
],
},
{
# Pull sanitizer-instrumented third-party libraries if requested via
# GYP_DEFINES.
# See src/third_party/instrumented_libraries/scripts/download_binaries.py.
# TODO(kjellander): Update comment when GYP is completely cleaned up.
'name': 'instrumented_libraries',
'pattern': '\\.sha1',
'action': ['python', 'src/third_party/instrumented_libraries/scripts/download_binaries.py'],
},
{
'name': 'clang_format_merge_driver',
'pattern': '.',
'action': [ 'python',
'src/tools/clang_format_merge_driver/install_git_hook.py',
],
},
{
# Download test resources, i.e. video and audio files from Google Storage.
'pattern': '.',
@ -84,3 +395,10 @@ hooks = [
},
]
recursedeps = [
# buildtools provides clang_format, libc++, and libc++abi.
'src/buildtools',
# android_tools manages the NDK.
'src/third_party/android_tools',
]

View File

@ -36,6 +36,7 @@ DIRECTORIES = [
'third_party/afl',
'third_party/binutils',
'third_party/boringssl',
'third_party/catapult',
'third_party/closure_compiler',
'third_party/colorama',
'third_party/expat',
@ -65,6 +66,7 @@ DIRECTORIES = [
'third_party/zlib',
'third_party/WebKit', # TODO(kjellander): Remove, see webrtc:5629.
'tools/clang',
'tools/clang_format_merge_driver',
'tools/determinism',
'tools/generate_library_loader',
'tools/generate_stubs',
@ -96,14 +98,15 @@ if 'android' in target_os:
'third_party/ashmem',
'third_party/bouncycastle',
'third_party/byte_buddy',
'third_party/catapult',
'third_party/ced',
'third_party/espresso',
'third_party/guava',
'third_party/hamcrest',
'third_party/icu',
'third_party/icu4j',
'third_party/ijar',
'third_party/intellij',
'third_party/javax_inject',
'third_party/jsr-305',
'third_party/junit',
'third_party/libxml',

View File

@ -115,7 +115,8 @@ def main():
# Avoid downloading NaCl toolchain as part of the Chromium hooks.
gclient_cmd = 'gclient.bat' if sys.platform.startswith('win') else 'gclient'
args = [
gclient_cmd, 'sync', '--force', '--revision', 'src@'+opts.target_revision
gclient_cmd, 'sync', '--force', '--nohooks', '--revision',
'src@' + opts.target_revision
]
if os.environ.get('CHROME_HEADLESS') == '1':

View File

@ -0,0 +1,43 @@
#!/usr/bin/env python
# Copyright (c) 2016 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.
"""Script to download the Google Play Services SDK without its license prompt.
This script needs to run after Chromium has been cloned and the link to //build
has been created.
"""
import os
import subprocess
import sys
ROOT_DIR = os.path.abspath(os.path.join(
os.path.dirname(os.path.abspath(__file__)), os.pardir, os.pardir))
CR_DIR = os.path.join(ROOT_DIR, 'chromium')
def main():
# Workaround to avoid license prompt for Google Play Services SDK
# See https://bugs.webrtc.org/5578 for more details.
play_services_script = os.path.join(CR_DIR, 'src', 'build', 'android',
'play_services', 'update.py')
if os.path.isfile(play_services_script):
env = os.environ.copy()
# Fake we're a buildbot to avoid the Google Play Services license prompt.
env['CHROME_HEADLESS'] = '1'
subprocess.check_call([sys.executable, play_services_script, 'download'],
env=env)
else:
print 'Cannot find %s, skipping.' % play_services_script
if __name__ == '__main__':
sys.exit(main())