diff --git a/DEPS b/DEPS index 7f261d464e..02c8867915 100644 --- a/DEPS +++ b/DEPS @@ -6,7 +6,7 @@ vars = { 'extra_gyp_flag': '-Dextra_gyp_flag=0', 'chromium_git': 'https://chromium.googlesource.com', - 'chromium_revision': 'c089d37d656ebb4bb19570c769cd184b1e7e4e73', + 'chromium_revision': '159828fc541faca44767e090cdc44545545f6155', } # NOTE: Prefer revision numbers to tags for svn deps. Use http rather than diff --git a/build_overrides/OWNERS b/build_overrides/OWNERS new file mode 100644 index 0000000000..0428a4a1ae --- /dev/null +++ b/build_overrides/OWNERS @@ -0,0 +1 @@ +kjellander@webrtc.org diff --git a/build_overrides/README.md b/build_overrides/README.md new file mode 100644 index 0000000000..906136e50e --- /dev/null +++ b/build_overrides/README.md @@ -0,0 +1,7 @@ +# Build overrides in GN + +This directory is used to allow us to customize variables that differ between +WebRTC being built as standalone and as a part of Chromium. + +There's another build_overrides in Chromium that needs to contain the same +set of files with the same set of variables (but with different values). diff --git a/build_overrides/v8.gni b/build_overrides/v8.gni new file mode 100644 index 0000000000..61ef74dd2e --- /dev/null +++ b/build_overrides/v8.gni @@ -0,0 +1,3 @@ +# Dummy file due to https://codereview.chromium.org/1397493004 +# TODO(kjellander): Clean up when http://crbug.com/541791 is done. +v8_use_external_startup_data = false diff --git a/build_overrides/webrtc.gni b/build_overrides/webrtc.gni new file mode 100644 index 0000000000..0869397bef --- /dev/null +++ b/build_overrides/webrtc.gni @@ -0,0 +1,22 @@ +# 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 file contains overrides to GN variables that applies for the WebRTC +# standalone build (i.e. not in Chromium). +# +# Every variable here needs to be present in the corresponding file in +# build_overrides/ of Chromium. + +build_with_chromium = false + +# Excluded in Chromium since its prerequisites don't require Pulse Audio. +rtc_include_pulse_audio = true + +# Chromium uses its own IO handling, so the internal ADM is only built for +# standalone WebRTC. +rtc_include_internal_audio_device = true diff --git a/webrtc/build/webrtc.gni b/webrtc/build/webrtc.gni index 261e9d7d37..1d33e892d7 100644 --- a/webrtc/build/webrtc.gni +++ b/webrtc/build/webrtc.gni @@ -8,11 +8,9 @@ import("//build/config/arm.gni") import("//build/config/mips.gni") +import("//build_overrides/webrtc.gni") declare_args() { - # Assume Chromium build for now, since that's the priority case for getting GN - # up and running with WebRTC. - build_with_chromium = true build_with_libjingle = true # Disable this to avoid building the Opus audio codec. @@ -61,25 +59,6 @@ declare_args() { # https://gcc.gnu.org/wiki/LinkTimeOptimization rtc_use_lto = false - if (build_with_chromium) { - # Exclude pulse audio on Chromium since its prerequisites don't require - # pulse audio. - rtc_include_pulse_audio = false - - # Exclude internal ADM since Chromium uses its own IO handling. - rtc_include_internal_audio_device = false - } else { - # 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: - # http://code.google.com/p/webrtc/issues/detail?id=163 - clang_use_chrome_plugins = false - - rtc_include_pulse_audio = true - rtc_include_internal_audio_device = true - } - if (build_with_libjingle) { rtc_include_tests = false rtc_restrict_logging = true diff --git a/webrtc/modules/audio_device/BUILD.gn b/webrtc/modules/audio_device/BUILD.gn index 0189335785..8875178c15 100644 --- a/webrtc/modules/audio_device/BUILD.gn +++ b/webrtc/modules/audio_device/BUILD.gn @@ -49,6 +49,7 @@ source_set("audio_device") { if (is_android) { include_dirs += [ "android" ] } + defines = [] if (rtc_include_internal_audio_device) { defines += [ "WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE" ] sources += [