summaryrefslogtreecommitdiff
path: root/chromium/buildtools
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-01-25 11:39:07 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-01-25 15:20:42 +0000
commit6c91641271e536ffaa88a1dff5127e42ee99a91e (patch)
tree703d9dd49602377ddc90cbf886aad37913f2496b /chromium/buildtools
parentb145b7fafd36f0c260d6a768c81fc14e32578099 (diff)
downloadqtwebengine-chromium-6c91641271e536ffaa88a1dff5127e42ee99a91e.tar.gz
BASELINE: Update Chromium to 49.0.2623.23
Also adds missing printing sources. Change-Id: I3726b8f0c7d6751c9fc846096c571fadca7108cd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'chromium/buildtools')
-rw-r--r--chromium/buildtools/DEPS7
-rwxr-xr-xchromium/buildtools/checkdeps/builddeps.py78
-rwxr-xr-xchromium/buildtools/checkdeps/checkdeps.py41
-rwxr-xr-xchromium/buildtools/checkdeps/checkdeps_test.py24
-rwxr-xr-xchromium/buildtools/checkdeps/graphdeps.py14
-rw-r--r--chromium/buildtools/linux64/gn.sha12
-rw-r--r--chromium/buildtools/mac/gn.sha12
-rw-r--r--chromium/buildtools/third_party/libc++/BUILD.gn9
-rw-r--r--chromium/buildtools/third_party/libc++/libc++.gyp19
-rw-r--r--chromium/buildtools/third_party/libc++abi/BUILD.gn10
-rw-r--r--chromium/buildtools/third_party/libc++abi/libc++abi.gyp7
-rw-r--r--chromium/buildtools/win/gn.exe.sha12
12 files changed, 143 insertions, 72 deletions
diff --git a/chromium/buildtools/DEPS b/chromium/buildtools/DEPS
index d72a7b9214d..897121e4250 100644
--- a/chromium/buildtools/DEPS
+++ b/chromium/buildtools/DEPS
@@ -1,6 +1,3 @@
-# The files DEPS and .DEPS.git need to be manually kept in sync. Depending on
-# whether buildtools is used from a svn or git project one or the other is used.
-
recursion = 1
use_relative_paths = True
@@ -8,8 +5,8 @@ vars = {
"git_url": "https://chromium.googlesource.com",
"clang_format_rev": "81edd558fea5dd7855d67a1dc61db34ae8c1fd63", # r223685
- "libcxx_revision": "48198f9110397fff47fe7c37cbfa296be7d44d3d",
- "libcxxabi_revision": "4ad1009ab3a59fa7a6896d74d5e4de5885697f95",
+ "libcxx_revision": "aad34a13af010898f54c1bb2069194cb083cea4b",
+ "libcxxabi_revision": "9a39e428d018b723d7d187181fd08908b1cb6bd0",
}
deps = {
diff --git a/chromium/buildtools/checkdeps/builddeps.py b/chromium/buildtools/checkdeps/builddeps.py
index 8ffd5ee790c..121a362db08 100755
--- a/chromium/buildtools/checkdeps/builddeps.py
+++ b/chromium/buildtools/checkdeps/builddeps.py
@@ -97,6 +97,11 @@ SPECIFIC_INCLUDE_RULES_VAR_NAME = 'specific_include_rules'
SKIP_SUBDIRS_VAR_NAME = 'skip_child_includes'
+class DepsBuilderError(Exception):
+ """Base class for exceptions in this module."""
+ pass
+
+
def NormalizePath(path):
"""Returns a path normalized to how we write DEPS rules and compare paths."""
return os.path.normcase(path).replace(os.path.sep, posixpath.sep)
@@ -105,9 +110,6 @@ def NormalizePath(path):
def _GitSourceDirectories(base_directory):
"""Returns set of normalized paths to subdirectories containing sources
managed by git."""
- if not os.path.exists(os.path.join(base_directory, '.git')):
- return set()
-
base_dir_norm = NormalizePath(base_directory)
git_source_directories = set([base_dir_norm])
@@ -161,9 +163,14 @@ class DepsBuilder(object):
self._under_test = being_tested
self._ignore_temp_rules = ignore_temp_rules
self._ignore_specific_rules = ignore_specific_rules
+ self._git_source_directories = None
- # Set of normalized paths
- self.git_source_directories = _GitSourceDirectories(self.base_directory)
+ if os.path.exists(os.path.join(base_directory, '.git')):
+ self.is_git = True
+ elif os.path.exists(os.path.join(base_directory, '.svn')):
+ self.is_git = False
+ else:
+ raise DepsBuilderError("%s is not a repository root" % base_directory)
# Map of normalized directory paths to rules to use for those
# directories, or None for directories that should be skipped.
@@ -258,13 +265,6 @@ class DepsBuilder(object):
"""
dir_path_norm = NormalizePath(dir_path_local_abs)
- # Check for a .svn directory in this directory or that this directory is
- # contained in git source directories. This will tell us if it's a source
- # directory and should be checked.
- if not (os.path.exists(os.path.join(dir_path_local_abs, '.svn')) or
- dir_path_norm in self.git_source_directories):
- return None, []
-
# Check the DEPS file in this directory.
if self.verbose:
print 'Applying rules from', dir_path_local_abs
@@ -334,6 +334,56 @@ class DepsBuilder(object):
subdir_path_norm = posixpath.join(dir_path_norm, subdir)
self.directory_rules[subdir_path_norm] = None
+ def GetAllRulesAndFiles(self, dir_name=None):
+ """Yields (rules, filenames) for each repository directory with DEPS rules.
+
+ This walks the directory tree while staying in the repository. Specify
+ |dir_name| to walk just one directory and its children; omit |dir_name| to
+ walk the entire repository.
+
+ Yields:
+ Two-element (rules, filenames) tuples. |rules| is a rules.Rules object
+ for a directory, and |filenames| is a list of the absolute local paths
+ of all files in that directory.
+ """
+ if self.is_git and self._git_source_directories is None:
+ self._git_source_directories = _GitSourceDirectories(self.base_directory)
+
+ # Collect a list of all files and directories to check.
+ files_to_check = []
+ if dir_name and not os.path.isabs(dir_name):
+ dir_name = os.path.join(self.base_directory, dir_name)
+ dirs_to_check = [dir_name or self.base_directory]
+ while dirs_to_check:
+ current_dir = dirs_to_check.pop()
+
+ # Check that this directory is part of the source repository. This
+ # prevents us from descending into third-party code or directories
+ # generated by the build system.
+ if self.is_git:
+ if NormalizePath(current_dir) not in self._git_source_directories:
+ continue
+ elif not os.path.exists(os.path.join(current_dir, '.svn')):
+ continue
+
+ current_dir_rules = self.GetDirectoryRules(current_dir)
+
+ if not current_dir_rules:
+ continue # Handle the 'skip_child_includes' case.
+
+ current_dir_contents = sorted(os.listdir(current_dir))
+ file_names = []
+ sub_dirs = []
+ for file_name in current_dir_contents:
+ full_name = os.path.join(current_dir, file_name)
+ if os.path.isdir(full_name):
+ sub_dirs.append(full_name)
+ else:
+ file_names.append(full_name)
+ dirs_to_check.extend(reversed(sub_dirs))
+
+ yield (current_dir_rules, file_names)
+
def GetDirectoryRules(self, dir_path_local):
"""Returns a Rules object to use for the given directory, or None
if the given directory should be skipped.
@@ -345,7 +395,9 @@ class DepsBuilder(object):
Args:
dir_path_local: A local path to the directory you want rules for.
- Can be relative and unnormalized.
+ Can be relative and unnormalized. It is the caller's responsibility
+ to ensure that this is part of the repository rooted at
+ |self.base_directory|.
"""
if os.path.isabs(dir_path_local):
dir_path_local_abs = dir_path_local
diff --git a/chromium/buildtools/checkdeps/checkdeps.py b/chromium/buildtools/checkdeps/checkdeps.py
index 03ab20c19c1..85e0ae998f9 100755
--- a/chromium/buildtools/checkdeps/checkdeps.py
+++ b/chromium/buildtools/checkdeps/checkdeps.py
@@ -82,35 +82,18 @@ class DepsChecker(DepsBuilder):
checkers = dict(
(extension, checker)
for checker in [java, cpp] for extension in checker.EXTENSIONS)
- self._CheckDirectoryImpl(checkers, start_dir)
-
- def _CheckDirectoryImpl(self, checkers, dir_name):
- rules = self.GetDirectoryRules(dir_name)
- if rules is None:
- return
-
- # Collect a list of all files and directories to check.
- files_to_check = []
- dirs_to_check = []
- contents = sorted(os.listdir(dir_name))
- for cur in contents:
- full_name = os.path.join(dir_name, cur)
- if os.path.isdir(full_name):
- dirs_to_check.append(full_name)
- elif os.path.splitext(full_name)[1] in checkers:
- if not self._skip_tests or not _IsTestFile(cur):
- files_to_check.append(full_name)
-
- # First check all files in this directory.
- for cur in files_to_check:
- checker = checkers[os.path.splitext(cur)[1]]
- file_status = checker.CheckFile(rules, cur)
- if file_status.HasViolations():
- self.results_formatter.AddError(file_status)
-
- # Next recurse into the subdirectories.
- for cur in dirs_to_check:
- self._CheckDirectoryImpl(checkers, cur)
+
+ for rules, file_paths in self.GetAllRulesAndFiles(start_dir):
+ for full_name in file_paths:
+ if self._skip_tests and _IsTestFile(os.path.basename(full_name)):
+ continue
+ file_extension = os.path.splitext(full_name)[1]
+ if not file_extension in checkers:
+ continue
+ checker = checkers[file_extension]
+ file_status = checker.CheckFile(rules, full_name)
+ if file_status.HasViolations():
+ self.results_formatter.AddError(file_status)
def CheckAddedCppIncludes(self, added_includes):
"""This is used from PRESUBMIT.py to check new #include statements added in
diff --git a/chromium/buildtools/checkdeps/checkdeps_test.py b/chromium/buildtools/checkdeps/checkdeps_test.py
index 29e656593e1..760668ce800 100755
--- a/chromium/buildtools/checkdeps/checkdeps_test.py
+++ b/chromium/buildtools/checkdeps/checkdeps_test.py
@@ -10,6 +10,7 @@ import os
import unittest
+import builddeps
import checkdeps
import results
@@ -104,6 +105,12 @@ class CheckDepsTest(unittest.TestCase):
def testCountViolationsIgnoringTempRules(self):
self.failUnlessEqual('11', self.CountViolations(True))
+ def testCountViolationsWithRelativePath(self):
+ self.deps_checker.results_formatter = results.CountViolationsFormatter()
+ self.deps_checker.CheckDirectory(
+ os.path.join('checkdeps', 'testdata', 'allowed'))
+ self.failUnlessEqual('4', self.deps_checker.results_formatter.GetResults())
+
def testTempRulesGenerator(self):
self.deps_checker.results_formatter = results.TemporaryRulesFormatter()
self.deps_checker.CheckDirectory(
@@ -116,6 +123,12 @@ class CheckDepsTest(unittest.TestCase):
u' "!third_party/no_rule/bad.h",']
self.failUnlessEqual(expected, temp_rules)
+ def testBadBaseDirectoryNotCheckoutRoot(self):
+ # This assumes git. It's not a valid test if buildtools is fetched via svn.
+ with self.assertRaises(builddeps.DepsBuilderError):
+ checkdeps.DepsChecker(being_tested=True,
+ base_directory=os.path.dirname(__file__))
+
def testCheckAddedIncludesAllGood(self):
problems = self.deps_checker.CheckAddedCppIncludes(
[['checkdeps/testdata/allowed/test.cc',
@@ -174,6 +187,17 @@ class CheckDepsTest(unittest.TestCase):
self.failUnless(len(problems) == 1)
self.failUnless(problems[0][0].endswith('/test.cc'))
+ def testTraversalIsOrdered(self):
+ dirs_traversed = []
+ for rules, filenames in self.deps_checker.GetAllRulesAndFiles():
+ self.failUnlessEqual(type(filenames), list)
+ self.failUnlessEqual(filenames, sorted(filenames))
+ if filenames:
+ dir_names = set(os.path.dirname(file) for file in filenames)
+ self.failUnlessEqual(1, len(dir_names))
+ dirs_traversed.append(dir_names.pop())
+ self.failUnlessEqual(dirs_traversed, sorted(dirs_traversed))
+
if __name__ == '__main__':
unittest.main()
diff --git a/chromium/buildtools/checkdeps/graphdeps.py b/chromium/buildtools/checkdeps/graphdeps.py
index 208772f0578..c82e572d603 100755
--- a/chromium/buildtools/checkdeps/graphdeps.py
+++ b/chromium/buildtools/checkdeps/graphdeps.py
@@ -99,26 +99,18 @@ class DepsGrapher(DepsBuilder):
def DumpDependencies(self):
""" Builds a dependency rule table and dumps the corresponding dependency
graph to all requested formats."""
- self._BuildDepsGraph(self.base_directory)
+ self._BuildDepsGraph()
self._DumpDependencies()
- def _BuildDepsGraph(self, full_path):
+ def _BuildDepsGraph(self):
"""Recursively traverses the source tree starting at the specified directory
and builds a dependency graph representation in self.deps."""
- rel_path = os.path.relpath(full_path, self.base_directory)
- #if re.search(self.incl, rel_path) and not re.search(self.excl, rel_path):
- rules = self.GetDirectoryRules(full_path)
- if rules:
+ for (rules, _) in self.GetAllRulesAndFiles():
deps = rules.AsDependencyTuples(
include_general_rules=True,
include_specific_rules=not self.ignore_specific_rules)
self.deps.update(deps)
- for item in sorted(os.listdir(full_path)):
- next_full_path = os.path.join(full_path, item)
- if os.path.isdir(next_full_path):
- self._BuildDepsGraph(next_full_path)
-
def _DumpDependencies(self):
"""Dumps the built dependency graph to the specified file with specified
format."""
diff --git a/chromium/buildtools/linux64/gn.sha1 b/chromium/buildtools/linux64/gn.sha1
index b4d042f7bd2..4efa917de5b 100644
--- a/chromium/buildtools/linux64/gn.sha1
+++ b/chromium/buildtools/linux64/gn.sha1
@@ -1 +1 @@
-99c8c860293ffaa02f0e501415c17ebbbf826240
+e9c85131a14705216383066fd04855fc4368e36e
diff --git a/chromium/buildtools/mac/gn.sha1 b/chromium/buildtools/mac/gn.sha1
index f692cfb06d3..9115bd5402f 100644
--- a/chromium/buildtools/mac/gn.sha1
+++ b/chromium/buildtools/mac/gn.sha1
@@ -1 +1 @@
-cba1c4a8dbff8569d4be21136d4442c3322580d5
+98b456726c06399c8e5cf1f4934e83445fcb1369
diff --git a/chromium/buildtools/third_party/libc++/BUILD.gn b/chromium/buildtools/third_party/libc++/BUILD.gn
index e225b7f2347..e6d7074be3b 100644
--- a/chromium/buildtools/third_party/libc++/BUILD.gn
+++ b/chromium/buildtools/third_party/libc++/BUILD.gn
@@ -3,22 +3,22 @@
# found in the LICENSE file.
config("config") {
- include_dirs = [
- "trunk/include",
- "../libc++abi/trunk/include",
- ]
cflags = [
+ "-isystem" + rebase_path("trunk/include", root_build_dir),
+ "-isystem" + rebase_path("../libc++abi/trunk/include", root_build_dir),
"-fPIC",
"-fstrict-aliasing",
"-nostdinc++",
"-pthread",
"-std=c++11",
+ "-DLIBCXX_BUILDING_LIBCXXABI",
]
}
shared_library("libc++") {
sources = [
"trunk/src/algorithm.cpp",
+ "trunk/src/any.cpp",
"trunk/src/bind.cpp",
"trunk/src/chrono.cpp",
"trunk/src/condition_variable.cpp",
@@ -58,6 +58,7 @@ shared_library("libc++") {
"//build/config/sanitizers:sanitizer_options_link_helper",
]
+ defines = [ "LIBCXX_BUILDING_LIBCXXABI" ]
ldflags = [ "-nodefaultlibs" ]
# TODO(GYP): Remove "-pthread" from ldflags.
diff --git a/chromium/buildtools/third_party/libc++/libc++.gyp b/chromium/buildtools/third_party/libc++/libc++.gyp
index 7422d10fc20..5a966fc9613 100644
--- a/chromium/buildtools/third_party/libc++/libc++.gyp
+++ b/chromium/buildtools/third_party/libc++/libc++.gyp
@@ -3,6 +3,9 @@
# found in the LICENSE file.
{
+ 'variables': {
+ 'libcxx_root': '../../buildtools/third_party/libc++',
+ },
'targets': [
{
'target_name': 'libcxx_proxy',
@@ -23,9 +26,9 @@
'all_dependent_settings': {
'target_conditions': [
['_type!="none"', {
- 'include_dirs': [
- 'trunk/include',
- '../libc++abi/trunk/include',
+ 'cflags': [
+ '-isystem<(libcxx_root)/trunk/include',
+ '-isystem<(libcxx_root)/../libc++abi/trunk/include',
],
'cflags_cc': [
'-nostdinc++',
@@ -57,6 +60,7 @@
],
'sources': [
'trunk/src/algorithm.cpp',
+ 'trunk/src/any.cpp',
'trunk/src/bind.cpp',
'trunk/src/chrono.cpp',
'trunk/src/condition_variable.cpp',
@@ -83,11 +87,9 @@
'trunk/src/utility.cpp',
'trunk/src/valarray.cpp',
],
- 'include_dirs': [
- 'trunk/include',
- '../libc++abi/trunk/include',
- ],
'cflags': [
+ '-isystem<(libcxx_root)/trunk/include',
+ '-isystem<(libcxx_root)/../libc++abi/trunk/include',
'-fPIC',
'-fstrict-aliasing',
'-nostdinc++',
@@ -101,6 +103,9 @@
'cflags!': [
'-fvisibility=hidden',
],
+ 'defines': [
+ 'LIBCXX_BUILDING_LIBCXXABI',
+ ],
'ldflags': [
'-nodefaultlibs',
],
diff --git a/chromium/buildtools/third_party/libc++abi/BUILD.gn b/chromium/buildtools/third_party/libc++abi/BUILD.gn
index 750dde137b4..c40027ca407 100644
--- a/chromium/buildtools/third_party/libc++abi/BUILD.gn
+++ b/chromium/buildtools/third_party/libc++abi/BUILD.gn
@@ -2,6 +2,13 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+config("libc++abi_warnings") {
+ if (is_clang) {
+ # http://llvm.org/PR25978
+ cflags = [ "-Wno-unused-function" ]
+ }
+}
+
static_library("libc++abi") {
sources = [
"trunk/src/abort_message.cpp",
@@ -14,6 +21,7 @@ static_library("libc++abi") {
"trunk/src/cxa_handlers.cpp",
"trunk/src/cxa_new_delete.cpp",
"trunk/src/cxa_personality.cpp",
+ "trunk/src/cxa_thread_atexit.cpp",
"trunk/src/cxa_unexpected.cpp",
"trunk/src/cxa_vector.cpp",
"trunk/src/cxa_virtual.cpp",
@@ -32,5 +40,7 @@ static_library("libc++abi") {
"//build/config/compiler:no_chromium_code",
"//build/config/compiler:rtti",
"//buildtools/third_party/libc++:config",
+ # Must be after no_chromium_code.
+ ":libc++abi_warnings",
]
}
diff --git a/chromium/buildtools/third_party/libc++abi/libc++abi.gyp b/chromium/buildtools/third_party/libc++abi/libc++abi.gyp
index 83aa7f3f22a..c3e6c07e1f9 100644
--- a/chromium/buildtools/third_party/libc++abi/libc++abi.gyp
+++ b/chromium/buildtools/third_party/libc++abi/libc++abi.gyp
@@ -20,6 +20,7 @@
'trunk/src/cxa_handlers.cpp',
'trunk/src/cxa_new_delete.cpp',
'trunk/src/cxa_personality.cpp',
+ 'trunk/src/cxa_thread_atexit.cpp',
'trunk/src/cxa_unexpected.cpp',
'trunk/src/cxa_vector.cpp',
'trunk/src/cxa_virtual.cpp',
@@ -32,6 +33,12 @@
'trunk/include',
'../libc++/trunk/include'
],
+ 'variables': {
+ 'clang_warning_flags': [
+ # http://llvm.org/PR25978
+ '-Wno-unused-function',
+ ],
+ },
'cflags': [
'-fPIC',
'-fstrict-aliasing',
diff --git a/chromium/buildtools/win/gn.exe.sha1 b/chromium/buildtools/win/gn.exe.sha1
index 3baaa76f1ce..a24bb4e3f68 100644
--- a/chromium/buildtools/win/gn.exe.sha1
+++ b/chromium/buildtools/win/gn.exe.sha1
@@ -1 +1 @@
-bcd10a05f7f1ea9f203f9e310e32e46612327369
+14b37907020b299b5c6bfae1d7fed7d7a92e4fe6