Roll chromium_revision 272489:277350 + fix sanitizer options

Rolling to this new Chromium revision required us to introduce
a sanitizer_options similar to the one in Chromium's base
(see https://code.google.com/p/chromium/codesearch#chromium/src/base/base.gyp&l=977
and https://codereview.chromium.org/238123003) in order
to get the same defaults for ASan and LSan. Without it
compilation will break since LeakSanitizer (LSan) is enabled by
default in Clang r209387 that is pulled with this roll.

I setup so that we pull in the sanitizer_options.cc and
tsan_suppressions.cc files using DEPS, so we don't have to maintain
them separately for now. We can still use our own TSan suppressions.txt
file as we do today with no changes needed.

This roll also brings in http://crrev.com/276676 so we can enable
GN build for WebRTC.

Overview of changes in Chrome DEPS:
$ svn diff http://src.chromium.org/chrome/trunk/src/DEPS -r 272489:277350

which can be compared with the output of:
$ svn cat http://webrtc.googlecode.com/svn/trunk/DEPS | grep chromium_deps | sed 's/^ *//' | sort | uniq

in a WebRTC checkout, gives the following relevant changes:
* third_party/android_tools 6fc0e1:c6e658
* third_party/libjpeg_turbo 263594:272637
* third_party/libyuv 1000:1007
* third_party/nss 271760:277057
* tools/gyp 1921:1927
* tools/swarming_client ae8085:aea506

The following also shows that Clang is upgraded from r206824 to r209387:
$ svn diff http://src.chromium.org/chrome/trunk/src/tools/clang/scripts/update.sh -r 272489:277350

BUG=3441
TEST=Trybots are not passing since after the recipe switch, SVN-based try jobs doesn't seem to support auto-detecting that a sync is needed if there's a DEPS change.
R=andrew@webrtc.org, pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/12729004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6516 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
kjellander@webrtc.org 2014-06-21 19:30:29 +00:00
parent 78f440c5e7
commit 27ab19d9b4
5 changed files with 98 additions and 8 deletions

2
.gitignore vendored
View File

@ -97,7 +97,9 @@
/tools/gyp /tools/gyp
/tools/protoc_wrapper /tools/protoc_wrapper
/tools/python /tools/python
/tools/sanitizer_options
/tools/swarming_client /tools/swarming_client
/tools/tsan_suppressions
/tools/valgrind /tools/valgrind
/tools/win /tools/win
/webrtc/examples/android/media_demo/bin /webrtc/examples/android/media_demo/bin

25
DEPS
View File

@ -11,7 +11,7 @@ vars = {
"googlecode_url": "http://%s.googlecode.com/svn", "googlecode_url": "http://%s.googlecode.com/svn",
"sourceforge_url": "http://svn.code.sf.net/p/%(repo)s/code", "sourceforge_url": "http://svn.code.sf.net/p/%(repo)s/code",
"chromium_trunk" : "http://src.chromium.org/svn/trunk", "chromium_trunk" : "http://src.chromium.org/svn/trunk",
"chromium_revision": "272489", "chromium_revision": "277350",
# A small subset of WebKit is needed for the Android Python test framework. # A small subset of WebKit is needed for the Android Python test framework.
"webkit_trunk": "http://src.chromium.org/blink/trunk", "webkit_trunk": "http://src.chromium.org/blink/trunk",
@ -137,9 +137,15 @@ deps = {
"tools/python": "tools/python":
Var("chromium_trunk") + "/src/tools/python@" + Var("chromium_revision"), Var("chromium_trunk") + "/src/tools/python@" + Var("chromium_revision"),
"tools/sanitizer_options":
File(Var("chromium_trunk") + "/src/base/debug/sanitizer_options.cc@" + Var("chromium_revision")),
"tools/swarming_client": "tools/swarming_client":
From("chromium_deps", "src/tools/swarming_client"), From("chromium_deps", "src/tools/swarming_client"),
"tools/tsan_suppressions":
File(Var("chromium_trunk") + "/src/base/debug/tsan_suppressions.cc@" + Var("chromium_revision")),
"tools/valgrind": "tools/valgrind":
Var("chromium_trunk") + "/src/tools/valgrind@" + Var("chromium_revision"), Var("chromium_trunk") + "/src/tools/valgrind@" + Var("chromium_revision"),
@ -160,7 +166,7 @@ deps = {
deps_os = { deps_os = {
"win": { "win": {
"third_party/drmemory": "third_party/drmemory":
Var("chromium_trunk") + "/src/third_party/drmemory@275048", Var("chromium_trunk") + "/src/third_party/drmemory@" + Var("chromium_revision"),
"third_party/winsdk_samples/src": "third_party/winsdk_samples/src":
(Var("googlecode_url") % "webrtc") + "/deps/third_party/winsdk_samples_v71@3145", (Var("googlecode_url") % "webrtc") + "/deps/third_party/winsdk_samples_v71@3145",
@ -173,10 +179,6 @@ deps_os = {
"third_party/nss": "third_party/nss":
From("chromium_deps", "src/third_party/nss"), From("chromium_deps", "src/third_party/nss"),
# SyzyASan to make it possible to run tests under ASan on Windows.
"third_party/syzygy/binaries":
From("chromium_deps", "src/third_party/syzygy/binaries"),
"tools/find_depot_tools": "tools/find_depot_tools":
File(Var("chromium_trunk") + "/src/tools/find_depot_tools.py@" + Var("chromium_revision")), File(Var("chromium_trunk") + "/src/tools/find_depot_tools.py@" + Var("chromium_revision")),
}, },
@ -346,6 +348,17 @@ hooks = [
"-s", Var("root_dir") + "/third_party/drmemory/drmemory-windows-sfx.exe.sha1", "-s", Var("root_dir") + "/third_party/drmemory/drmemory-windows-sfx.exe.sha1",
], ],
}, },
{
# Pull the Syzygy binaries, used for optimization and instrumentation.
"name": "syzygy-binaries",
"pattern": ".",
"action": ["python",
Var("root_dir") + "/build/get_syzygy_binaries.py",
"--output-dir=%s/third_party/syzygy/binaries" % Var("root_dir"),
"--revision=b08fb72610963d31cc3eae33f746a04e263bd860",
"--overwrite",
],
},
{ {
# Download test resources, i.e. video and audio files from Google Storage. # Download test resources, i.e. video and audio files from Google Storage.
"pattern": "\\.sha1", "pattern": "\\.sha1",

View File

@ -575,7 +575,6 @@ size_t ReplacePayload(webrtc::test::InputAudioFile* replacement_audio_file,
" not supported or unknown." << std::endl; " not supported or unknown." << std::endl;
webrtc::Trace::ReturnTrace(); webrtc::Trace::ReturnTrace();
exit(1); exit(1);
assert(false);
} }
} }
return payload_len; return payload_len;

View File

@ -0,0 +1,59 @@
# Copyright (c) 2014 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 a similar target to the one in Chromium's base.gyp. It's needed to get
# the same sanitizer settings as Chromium uses (i.e. ASan, LSan, TSan...).
{
'targets': [
{
'target_name': 'sanitizer_options',
'type': 'static_library',
'toolsets': ['host', 'target'],
'variables': {
# Every target is going to depend on sanitizer_options, so allow
# this one to depend on itself.
'prune_self_dependency': 1,
# Do not let 'none' targets depend on this one, they don't need to.
'link_dependency': 1,
},
'sources': [
'<(DEPTH)/tools/sanitizer_options/sanitizer_options.cc',
],
'include_dirs': [
'<(DEPTH)',
],
# Some targets may want to opt-out from ASan, TSan and MSan and link
# without the corresponding runtime libraries. We drop the libc++
# dependency and omit the compiler flags to avoid bringing instrumented
# code to those targets.
'conditions': [
['use_custom_libcxx==1', {
'dependencies!': [
'<(DEPTH)/third_party/libc++/libc++.gyp:libcxx_proxy',
],
}],
['tsan==1', {
'sources': [
'<(DEPTH)/tools/tsan_suppressions/tsan_suppressions.cc',
],
}],
],
'cflags!': [
'-fsanitize=address',
'-fsanitize=thread',
'-fsanitize=memory',
'-fsanitize-memory-track-origins',
],
'direct_dependent_settings': {
'ldflags': [
'-Wl,-u_sanitizer_options_link_helper',
],
},
},
], # targets
}

View File

@ -1,6 +1,23 @@
{ {
'variables': { 'variables': {
'variables': {
'webrtc_root%': '<(DEPTH)/webrtc',
},
'webrtc_root%': '<(webrtc_root)',
'build_with_chromium': 0, 'build_with_chromium': 0,
'use_sanitizer_options': 0, 'use_sanitizer_options': 0,
} },
'target_defaults': {
'conditions': [
# Add default sanitizer options similar to Chromium. This cannot be
# put in webrtc/build/common.gypi since that file is not included by
# third party code (yasm will throw leak errors during compile when
# GYP_DEFINES="asan=1".
['OS=="linux" and (chromeos==0 or target_arch!="ia32")', {
'dependencies': [
'<(webrtc_root)/sanitizer_options.gyp:sanitizer_options',
],
}],
],
},
} }