Commit 2e1d3917 authored by David Fifield's avatar David Fifield Committed by Georg Koppen
Browse files

Bug 28725: Upgrade go-webrtc to dcbfc825aa33471253a5da1834d499257e05d557.

This necessitates an upgrade to webrtc to branch-heads/64. Compare to:
https://github.com/keroserene/go-webrtc/commit/1ca4087bc01b9a6726a68c72ac541b03a91c4c7b

-D_GLIBCXX_USE_CXX11_ABI=1 is no longer required, as the default has
changed:
https://github.com/keroserene/go-webrtc/commit/a3140c36f9933013ad2e66bc21358a1bfea95a95

I needed to add libgtk-3-dev as a build dependency for webrtc.
libgtk-3-dev appears in src/build/install-build-deps.sh.

I also had to upgrade depot_tools to
7d9d9233cb657e968831238346917b0b64abb4c1. I got the commit ID from
src/DEPS in the webrtc source. Without upgrading depot_tools, I got this
error from gclient:
	Error: 1> dependency url must be either a string, None, File() or From() instead of dict

I needed to add a command to delete src/testing/{gmock,gtest}; otherwise
"gclient sync" complains about overwriting unversioned files.
https://bugs.torproject.org/25483#comment:15
https://gitweb.torproject.org/user/boklm/tor-browser-build.git/commit/?h=bug_25483_v0&id=d5514f7f3b566cf37bfc59ec8105a96130577ff2
The error is
	src/testing (ERROR)
	----------------------------------------
	[0:00:00] Started.
	[0:00:01] From https://chromium.googlesource.com/chromium/src/testing
	[0:00:01]    7d7436a8..9805faa0  master     -> origin/master
	----------------------------------------
	Error: Command 'git checkout --quiet 60c665fffe7dc505fdd5d30f9dbcbc50dde1e017' returned non-zero exit status 1 in /home/user/tor-browser-build/gclient/webrtc/src/testing
	error: The following untracked working tree files would be overwritten by checkout:
		gmock/include/gmock/gmock-actions.h
		gmock/include/gmock/gmock-generated-function-mockers.h
		gmock/include/gmock/gmock-matchers.h
		gmock/include/gmock/gmock.h
		gtest/include/gtest/gtest-death-test.h
		gtest/include/gtest/gtest-message.h
		gtest/include/gtest/gtest-param-test.h
		gtest/include/gtest/gtest-spi.h
		gtest/include/gtest/gtest.h
		gtest/include/gtest/gtest_prod.h
	Please move or remove them before you switch branches.
	Aborting
parent d8db312e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
# vim: filetype=yaml sw=2
version: '[% c("abbrev") %]'
git_hash: 28216cd14b44716db5c83634afbdc6e90492652b
git_hash: 7d9d9233cb657e968831238346917b0b64abb4c1
git_url: https://chromium.googlesource.com/chromium/tools/depot_tools.git
filename: '[% project %]-[% c("version") %].tar.gz'
+2 −6
Original line number Diff line number Diff line
# vim: filetype=yaml sw=2
version: '[% c("abbrev") %]'
git_url: https://github.com/keroserene/go-webrtc.git
git_hash: 90ac15ae07cc6e820cd922a239dd892598986622
git_hash: dcbfc825aa33471253a5da1834d499257e05d557
filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'

build: '[% c("projects/go/var/build_go_lib") %]'
@@ -21,12 +21,8 @@ var:
    rm -rf include/ lib/
    cp -a /var/tmp/dist/webrtc/{include,lib} .
    [% IF c("var/linux") -%]
      # The go-webrtc package sets _GLIBCXX_USE_CXX11_ABI=0 for compatibility with
      # the prebuilt libwebrtc-magic.a libraries. Since we build our own
      # libwebrtc-magic.a with the C++11 ABI, we have to undo that setting here,
      # using CGO_CXXFLAGS.
      # __STDC_FORMAT_MACROS is needed for a definition of PRIxPTR from inttypes.h.
      export CGO_CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=1 -D__STDC_FORMAT_MACROS=1"
      export CGO_CXXFLAGS="-D__STDC_FORMAT_MACROS=1"
      export CGO_LDFLAGS=-latomic
    [% END -%]
    [% IF c("var/osx") -%]
+5 −1
Original line number Diff line number Diff line
@@ -101,6 +101,8 @@ GN_ARGS+=" treat_warnings_as_errors=false"
GN_ARGS+=" is_component_build=false"
# Do not use bundled utilities.
GN_ARGS+=" is_clang=false use_sysroot=false"
# Use libstdc++, not libc++.
GN_ARGS+=" use_custom_libcxx=false"
[% IF c("var/linux") -%]
  GN_ARGS+=" target_os=\"linux\" target_cpu=\"[% IF c("var/linux-i686") %]x86[% ELSE %]x64[% END %]\""
  GN_ARGS+=" gold_path=\"$INSTDIR/binutils/bin\""
@@ -116,6 +118,8 @@ GN_ARGS+=" is_clang=false use_sysroot=false"
  GN_ARGS+=" target_os=\"mac\" target_cpu=\"x64\" mac_deployment_target=\"10.7\""
  GN_ARGS+=" clang_use_chrome_plugins=false"
  GN_ARGS+=" clang_base_path=\"$clangdir\""
  # No lld in our toolchain currently.
  GN_ARGS+=" use_lld=false"
  # Avoid some dependencies.
  GN_ARGS+=" rtc_include_opus=false rtc_include_ilbc=false rtc_include_internal_audio_device=false"
  # Tests are needed for field_trial, metrics_default, and pc_test_utils targets
@@ -147,7 +151,7 @@ mkdir -p include lib
cp -f $builddir/libwebrtc-magic.a [% c("var/webrtc/lib_path") %]
INCLUDE_DIR="$PWD/include"
cd $builddir
find webrtc/ -type f -name '*.h' -print0 | while IFS= read -r -d '' h;
find . -type f -name '*.h' -print0 | while IFS= read -r -d '' h;
do
  mkdir -p "$INCLUDE_DIR/$(dirname "$h")"
  cp -f "$h" "$INCLUDE_DIR/$h"
+5 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ filename: 'webrtc-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id")
var:
  container:
    use_container: 1
  webrtc_tag: c279861207c5b15fc51069e96595782350e0ac12
  webrtc_tag: 88f5d9180eae78a6162cccd78850ff416eb82483

input_files:
  - project: container-image
@@ -33,6 +33,7 @@ targets:
        - libexpat1-dev
        - libglib2.0-dev
        - libgtk2.0-dev
        - libgtk-3-dev
        - libudev-dev
        - libx11-dev
        - libxext-dev
@@ -101,6 +102,9 @@ steps:
        git config diff.ignoreSubmodules all
        cd ..
      fi
      # Delete the unversioned gmock and gtest directories, which cause "gclient sync"
      # to fail when upgrading between webrtc branch-heads/58 and branch-heads/64.
      rm -rf src/testing/gmock src/testing/gtest
      # "gclient" is part of depot_tools. This download takes a long time the first time.
      gclient sync --no-history --with_branch_heads -r [% c("var/webrtc_tag") %]
      cd ..
+6 −6
Original line number Diff line number Diff line
From ebc1773a92884bec7d93274b2d729ccf76050197 Mon Sep 17 00:00:00 2001
From: David Fifield <fifield@eecs.berkeley.edu>
Date: Wed, 22 Mar 2017 09:53:07 -0400
From 2d7897d479a13cbf68335140b61228cd5552dfd9 Mon Sep 17 00:00:00 2001
From: David Fifield <david@bamsoftware.com>
Date: Mon, 3 Dec 2018 21:14:32 -0700
Subject: [PATCH] Disable some settings in build_overrides.

---
@@ -8,10 +8,10 @@ Subject: [PATCH] Disable some settings in build_overrides.
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build_overrides/build.gni b/build_overrides/build.gni
index af4924d4c..ffaafdebc 100644
index 81cb3e73ae..5304a64ce8 100644
--- a/build_overrides/build.gni
+++ b/build_overrides/build.gni
@@ -14,7 +14,7 @@ mac_sdk_min_build_override = "10.11"
@@ -10,7 +10,7 @@
 enable_java_templates = true
 
 # Some non-Chromium builds don't use Chromium's third_party/binutils.
@@ -21,5 +21,5 @@ index af4924d4c..ffaafdebc 100644
 # Variable that can be used to support multiple build scenarios, like having
 # Chromium specific targets in a client project's GN file etc.
-- 
2.12.1
2.11.0
Loading