[tbb-commits] [tor-browser-build/master] Update webrtc, go-webrtc and snowflake

boklm at torproject.org boklm at torproject.org
Sun Apr 23 21:40:01 UTC 2017


commit cebffc5e3931f7f921068f44214ff19a0350bf11
Author: Nicolas Vigier <boklm at torproject.org>
Date:   Sun Apr 23 23:29:41 2017 +0200

    Update webrtc, go-webrtc and snowflake
    
    tor-browser-bundle.git commit: 38689af2a845dfa85765bf52e535c89476863378
    tor-browser-bundle.git commit: 121de1ca7cbee29f34f99753a7948c7447e38965
    tor-browser-bundle.git commit: e9b16e19134655aa16a8840e09093e01692138d5
---
 projects/go-webrtc/config                          |  6 ++-
 projects/snowflake/config                          |  2 +-
 .../Bundle-Data/PTConfigs/bridge_prefs.js          |  2 +-
 projects/webrtc/build                              | 58 +++++++++++++---------
 projects/webrtc/config                             | 17 ++++---
 projects/webrtc/webrtc-linux.patch                 | 25 ++++++++++
 6 files changed, 75 insertions(+), 35 deletions(-)

diff --git a/projects/go-webrtc/config b/projects/go-webrtc/config
index 778d3db..3a1a9d4 100644
--- a/projects/go-webrtc/config
+++ b/projects/go-webrtc/config
@@ -1,7 +1,7 @@
 # vim: filetype=yaml sw=2
 version: '[% c("abbrev") %]'
 git_url: https://github.com/keroserene/go-webrtc.git
-git_hash: 69c5ca70533142494d145b43ef2f46ca94715557
+git_hash: ab1b64862e0c4b4182010699911c2c5818f0a101
 filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'
 remote_docker: 1
 
@@ -23,7 +23,9 @@ var:
     # 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.
-    export CGO_CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=1
+    # __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_LDFLAGS=-latomic
 
 targets:
   master:
diff --git a/projects/snowflake/config b/projects/snowflake/config
index 5ba006b..3233ba4 100644
--- a/projects/snowflake/config
+++ b/projects/snowflake/config
@@ -1,7 +1,7 @@
 # vim: filetype=yaml sw=2
 version: '[% c("abbrev") %]'
 git_url: https://git.torproject.org/pluggable-transports/snowflake.git
-git_hash: 6cecd31fd896eb26e64ad8bab8a9ea510ec3b21d
+git_hash: 9f2e9a6ecb696149708716ca06ce842df03cf492
 filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'
 remote_docker: 1
 
diff --git a/projects/tor-browser/Bundle-Data/PTConfigs/bridge_prefs.js b/projects/tor-browser/Bundle-Data/PTConfigs/bridge_prefs.js
index bcf3a19..922e181 100644
--- a/projects/tor-browser/Bundle-Data/PTConfigs/bridge_prefs.js
+++ b/projects/tor-browser/Bundle-Data/PTConfigs/bridge_prefs.js
@@ -39,4 +39,4 @@ pref("extensions.torlauncher.default_bridge.obfs4.21", "obfs4 38.229.1.78:80 C8C
 pref("extensions.torlauncher.default_bridge.meek-amazon.1", "meek 0.0.2.0:2 B9E7141C594AF25699E0079C1F0146F409495296 url=https://d2zfqthxsdq309.cloudfront.net/ front=a0.awsstatic.com");
 pref("extensions.torlauncher.default_bridge.meek-azure.1", "meek 0.0.2.0:3 97700DFE9F483596DDA6264C4D7DF7641E1E39CE url=https://meek.azureedge.net/ front=ajax.aspnetcdn.com");
 
-pref("extensions.torlauncher.default_bridge.snowflake.1", "snowflake 0.0.3.0:1 B05EC36590AC0374F0E4D36DDA77908FD59D97F3");
+pref("extensions.torlauncher.default_bridge.snowflake.1", "snowflake 0.0.3.0:1 2B280B23E1107BB62ABFC40DDCC8824814F80A72");
diff --git a/projects/webrtc/build b/projects/webrtc/build
index 5a70fbe..3ae7ed0 100644
--- a/projects/webrtc/build
+++ b/projects/webrtc/build
@@ -22,20 +22,17 @@ tar -C /var/tmp/build -xf webrtc-sources-[% c('version') %].tar.gz
 
 builddir=/var/tmp/build/[% project %]/src
 cd $builddir
-export GYP_CROSSCOMPILE=1
-export GYP_DEFINES="OS=[% c("var/webrtc/os") %] target_arch=[% c("var/webrtc/arch") %]"
-# Do not use bundled utilities.
-GYP_DEFINES+=" clang=0 host_clang=0 use_sysroot=0"
-GYP_DEFINES+=" linux_use_bundled_gold=0 linux_use_gold_flags=0 linux_use_bundled_binutils=0"
-# Avoid some dependencies. Some of these don't seem to work fully; for
-# example even with use_alsa=0 we need libasound2-dev.
-GYP_DEFINES+=" use_x11=0 use_gtk=0 use_gconf=0 use_alsa=0 use_pulseaudio=0 use_libpci=0 include_internal_audio_device=0 enabled_libjingle_device_manager=0"
-# examples and tests also bring in dependencies.
-GYP_DEFINES+=" include_examples=0 include_tests=0"
-# embedded=1 is supposed to turn of various features; see
-# https://bugs.chromium.org/p/chromium/issues/detail?id=318413.
-GYP_DEFINES+=" embedded=1"
-GYP_DEFINES+=" werror="
+
+patch -p1 < $rootdir/webrtc-linux.patch
+
+# First, build a copy of GN, rather than use the prebuilt copy in buildtools/linux64.
+cd tools/gn
+# __STDC_FORMAT_MACROS is needed for a definition of PRIxPTR from inttypes.h.
+CXXFLAGS=-D__STDC_FORMAT_MACROS=1 LDFLAGS=-latomic ./bootstrap/bootstrap.py --no-rebuild --no-clean
+cd ../..
+# This is where bootstrap.py stashes the built gn.
+GN="$PWD/out_bootstrap/gn"
+
 [% IF c("var/linux") -%]
   export CC=gcc
   export CXX=g++
@@ -48,16 +45,31 @@ GYP_DEFINES+=" werror="
   export CXXFLAGS=-m32
   export LDFLAGS=-m32
 [% END -%]
-JAVA_HOME=/usr/lib/jvm/default-java webrtc/build/gyp_webrtc.py
-ninja -C out/Release
-# Run ninja once more, without include_tests=0, in order to build just the
-# FakeAudioCaptureModule that go-webrtc uses.
-GYP_DEFINES="$(echo "$GYP_DEFINES" | sed -e 's/include_tests=0//g')"
-JAVA_HOME=/usr/lib/jvm/default-java webrtc/build/gyp_webrtc.py
-ninja -C out/Release obj/webrtc/api/test/peerconnection_unittests.fakeaudiocapturemodule.o
+
+export GN_ARGS=""
+# For a list of all possible GN args, do "gn gen out/Release; gn args --list out/Release".
+# https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/cross_compiles.md
+GN_ARGS+=" target_os=\"linux\" target_cpu=\"[% IF c("var/linux-i686") %]x86[% ELSE %]x64[% END %]\""
+# Not debug.
+GN_ARGS+=" is_debug=false"
+# There are warnings from unused returns.
+GN_ARGS+=" treat_warnings_as_errors=false"
+# Build static libraries.
+GN_ARGS+=" is_component_build=false"
+# Do not use bundled utilities.
+GN_ARGS+=" is_clang=false use_sysroot=false"
+GN_ARGS+=" gold_path=\"$INSTDIR/binutils/bin\""
+# Make extra sure we don't use bundled binutils.
+rm -rf third_party/binutils/Linux_*
+# Avoid some dependencies.
+GN_ARGS+=" use_ozone=true use_gconf=false"
+GN_ARGS+=" rtc_include_opus=false rtc_include_ilbc=false rtc_include_internal_audio_device=false rtc_include_pulse_audio=false"
+# Included for "field_trial" below.  Maybe "fieldtrial_testing_like_official_build" could help here?
+#GN_ARGS+=" rtc_include_tests=false"
+rm -rf out/Release
+"$GN" gen out/Release --args="$GN_ARGS"
+ninja -C out/Release webrtc field_trial metrics_default pc_test_utils
 # https://github.com/keroserene/go-webrtc/issues/23#issuecomment-175312648
-# dump_syms_regtest.o is actually an executable, not an object file. If not
-# excluded, it results in the error:
 # libwebrtc-linux-386-magic.a(dump_syms_regtest.o): unsupported ELF file type 2
 ar crs libwebrtc-magic.a $(find . -name '*.o' -not -name '*.main.o' -not -name 'dump_syms_regtest.o' | sort)
 
diff --git a/projects/webrtc/config b/projects/webrtc/config
index 52618c2..bfd38c9 100644
--- a/projects/webrtc/config
+++ b/projects/webrtc/config
@@ -4,7 +4,7 @@ remote_docker: 1
 filename: 'webrtc-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'
 
 var:
-  webrtc_tag: f33698296719f956497d2dbff81b5080864a8804
+  webrtc_tag: c279861207c5b15fc51069e96595782350e0ac12
 
 input_files:
   - project: docker-image
@@ -17,6 +17,8 @@ input_files:
   - project: binutils
     name: binutils
     enable: '[% c("var/linux") %]'
+  - filename: webrtc-linux.patch
+    enable: '[% c("var/linux") %]'
 
 targets:
   linux:
@@ -28,16 +30,17 @@ targets:
       dockerbuild: "[% pc('docker-image', 'pre') %]"
       sort_deps: 0
       arch_deps:
-        - default-jre-headless
-        - default-jdk
         - lib32asound2-dev
         - lib64expat1
         - libexpat1-dev:i386
+        - libglib2.0-dev:i386
+        - libgtk2.0-dev:i386
         - libudev-dev:i386
         - libx11-dev:i386
         - libxext-dev:i386
         - libxrandr-dev:i386
         - lib32stdc++6
+        - pkg-config
         - hardening-wrapper
       webrtc:
         arch: ia32
@@ -46,14 +49,15 @@ targets:
   linux-x86_64:
     var:
       arch_deps:
-        - default-jre-headless
-        - default-jdk
         - libasound2-dev
         - libexpat1-dev
+        - libglib2.0-dev
+        - libgtk2.0-dev
         - libudev-dev
         - libx11-dev
         - libxext-dev
         - libxrandr-dev
+        - pkg-config
       webrtc:
         arch: x64
         lib_arch: amd64
@@ -70,10 +74,7 @@ steps:
       # https://webrtc.org/native-code/development/
       tar xf [% c('input_files_by_name/depot_tools') %]
       export PATH="$rootdir/depot_tools:$PATH"
-      # GYP_CROSSCOMPILE=1 and GYP_DEFINES="use_x11=0" prevent probing for certain dependencies.
       # Use --no-history because the whole checkout with history is about 12 GB.
-      export GYP_CROSSCOMPILE=1
-      export GYP_DEFINES="use_x11=0"
       # JAVA_HOME is needed in a hook for libjingle. The readlink line tries to find the current JRE.
       # default-java comes from the package default-jdk-headless.
       export JAVA_HOME=/usr/lib/jvm/default-java
diff --git a/projects/webrtc/webrtc-linux.patch b/projects/webrtc/webrtc-linux.patch
new file mode 100644
index 0000000..b1efb7a
--- /dev/null
+++ b/projects/webrtc/webrtc-linux.patch
@@ -0,0 +1,25 @@
+From ebc1773a92884bec7d93274b2d729ccf76050197 Mon Sep 17 00:00:00 2001
+From: David Fifield <fifield at eecs.berkeley.edu>
+Date: Wed, 22 Mar 2017 09:53:07 -0400
+Subject: [PATCH] Disable some settings in build_overrides.
+
+---
+ build_overrides/build.gni | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build_overrides/build.gni b/build_overrides/build.gni
+index af4924d4c..ffaafdebc 100644
+--- a/build_overrides/build.gni
++++ b/build_overrides/build.gni
+@@ -14,7 +14,7 @@ mac_sdk_min_build_override = "10.11"
+ enable_java_templates = true
+ 
+ # Some non-Chromium builds don't use Chromium's third_party/binutils.
+-linux_use_bundled_binutils_override = true
++linux_use_bundled_binutils_override = false
+ 
+ # 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
+





More information about the tbb-commits mailing list