Skip to content

Commit

Permalink
Update //build to m114.0.5735.331.
Browse files Browse the repository at this point in the history
b/313662336

Change-Id: I025cd291b47a5376c16109917831dc39a974d70b
  • Loading branch information
aee-google committed Jan 2, 2024
1 parent 2285d51 commit 3c6b907
Show file tree
Hide file tree
Showing 1,176 changed files with 51,185 additions and 29,493 deletions.
1 change: 1 addition & 0 deletions build/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ciopfs
/android/bin
/android/binary_size/apks/**/*.apk
/args/chromeos/*.gni
/args/chromeos/rewrapper*
/config/gclient_args.gni
/cros_cache/
/Debug
Expand Down
39 changes: 37 additions & 2 deletions build/BUILD.gn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018 The Chromium Authors. All rights reserved.
# Copyright 2018 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

Expand All @@ -7,6 +7,9 @@ import("//build/config/chrome_build.gni")
import("//build/config/chromecast_build.gni")
import("//build/config/chromeos/args.gni")
import("//build/config/chromeos/ui_mode.gni")
import("//build/config/features.gni")
import("//build/util/process_version.gni")
import("//build_overrides/build.gni")

source_set("buildflag_header_h") {
sources = [ "buildflag.h" ]
Expand All @@ -28,10 +31,20 @@ buildflag_header("branding_buildflags") {
}
}

buildflag_header("blink_buildflags") {
header = "blink_buildflags.h"
flags = [ "USE_BLINK=$use_blink" ]
}

buildflag_header("chromecast_buildflags") {
header = "chromecast_buildflags.h"

flags = [ "IS_CHROMECAST=$is_chromecast" ]
flags = [
"IS_CHROMECAST=$is_chromecast",
"IS_CASTOS=$is_castos",
"IS_CAST_ANDROID=$is_cast_android",
"ENABLE_CAST_RECEIVER=$enable_cast_receiver",
]
}

buildflag_header("chromeos_buildflags") {
Expand All @@ -42,5 +55,27 @@ buildflag_header("chromeos_buildflags") {

"IS_CHROMEOS_LACROS=$is_chromeos_lacros",
"IS_CHROMEOS_ASH=$is_chromeos_ash",
"IS_CHROMEOS_WITH_HW_DETAILS=$is_chromeos_with_hw_details",
"IS_REVEN=$is_reven",
]
}

if (build_with_chromium) {
group("gold_common_pytype") {
testonly = true

data = [ "//build/skia_gold_common/" ]

data_deps = [ "//testing:pytype_dependencies" ]
}
}

if (is_chromeos) {
process_version("version_metadata") {
sources = [ "//chrome/VERSION" ]

template_file = "metadata.json.in"
output = "$root_out_dir/metadata.json"
process_only = true
}
}
20 changes: 0 additions & 20 deletions build/METADATA

This file was deleted.

16 changes: 12 additions & 4 deletions build/OWNERS
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
set noparent
# NOTE: keep this in sync with [email protected] owners
# by emailing [email protected] when this list changes.
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

# Clang build config changes:
[email protected]
file://tools/clang/scripts/OWNERS

# For java build changes:
[email protected]
[email protected]

# NOTE: keep this in sync with [email protected] owners
# by emailing [email protected] when this list changes.

per-file .gitignore=*
per-file check_gn_headers_whitelist.txt=*
# Mac build changes:
per-file [email protected]
per-file [email protected]
per-file mac_toolchain.py=file://build/mac/OWNERS
per-file xcode_binaries.yaml=file://build/mac/OWNERS

per-file .gitignore=*
per-file check_gn_headers_whitelist.txt=*
per-file whitespace_file.txt=*
per-file OWNERS.status=*
per-file OWNERS.setnoparent=set noparent
per-file OWNERS.setnoparent=file://ENG_REVIEW_OWNERS
per-file OWNERS.setnoparent=file://ATL_OWNERS
31 changes: 27 additions & 4 deletions build/OWNERS.setnoparent
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
# docs/code_reviews.md#owners-file-details for more details.

# Overall project governance.
file://ENG_REVIEW_OWNERS
file://ATL_OWNERS

# Third-party dependency review, see //docs/adding_to_third_party.md
file://third_party/OWNERS

# Security reviews
file://build/fuchsia/SECURITY_OWNERS
file://chromeos/SECURITY_OWNERS
file://content/browser/SITE_ISOLATION_OWNERS
file://fuchsia/SECURITY_OWNERS
file://content/browser/CHILD_PROCESS_SECURITY_POLICY_OWNERS
file://ipc/SECURITY_OWNERS
file://net/base/SECURITY_OWNERS
file://sandbox/linux/OWNERS
Expand All @@ -28,6 +28,9 @@ file://base/metrics/OWNERS
# expose to the open web.
file://third_party/blink/API_OWNERS

# third_party/blink/web_tests/VirtualTestSuites need special care.
file://third_party/blink/web_tests/VIRTUAL_OWNERS

# Extension related files.
file://chrome/browser/extensions/component_extensions_allowlist/EXTENSION_ALLOWLIST_OWNERS
file://extensions/common/api/API_OWNERS
Expand All @@ -42,7 +45,7 @@ file://ui/android/java/res/LAYOUT_OWNERS
# Chrome and Chrome OS).
# The rules are documented at:
# https://sites.google.com/a/chromium.org/dev/developers/how-tos/enterprise/adding-new-policies
file://components/policy/resources/ENTERPRISE_POLICY_OWNERS
file://components/policy/ENTERPRISE_POLICY_OWNERS

# This restriction is in place due to the complicated compliance regulations
# around this code.
Expand All @@ -60,3 +63,23 @@ file://weblayer/API_OWNERS
# New features for lock/login UI on Chrome OS need to work stably in all corner
# cases.
file://ash/login/LOGIN_LOCK_OWNERS

# Changes to the CQ/CI configuration can have a significant impact on infra cost
# and performance. Approval should be limited to a small subset of the users
# that can make infra changes.
file://infra/config/groups/cq-usage/CQ_USAGE_OWNERS
file://infra/config/groups/sheriff-rotations/CHROMIUM_OWNERS

# Origin Trials owners are responsible for determining trials that need to be
# completed manually.
file://third_party/blink/common/origin_trials/OT_OWNERS

# New notifiers added to //ash/constants/notifier_catalogs.h and
# //ash/constants/quick_settings_catalogs.h should be reviewed
# by //ash/system owners to ensure that the correct notifier is being used.
file://ash/system/OWNERS

# WebUI surfaces are user visible and frequently are kept around indefinitely.
# New WebUI additions should be reviewed by WebUI PLATFORM_OWNERS to ensure
# they follow the guidance at https://www.chromium.org/developers/webui
file://ui/webui/PLATFORM_OWNERS
57 changes: 57 additions & 0 deletions build/PRESUBMIT.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Copyright 2022 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

PRESUBMIT_VERSION = '2.0.0'

# This line is 'magic' in that git-cl looks for it to decide whether to
# use Python3 instead of Python2 when running the code in this file.
USE_PYTHON3 = True

import textwrap


def CheckNoBadDeps(input_api, output_api):
"""Prevent additions of bad dependencies from the //build prefix."""
build_file_patterns = [
r'(.+/)?BUILD\.gn',
r'.+\.gni',
]
blocklist_pattern = input_api.re.compile(r'^[^#]*"//(?!build).+?/.*"')
allowlist_pattern = input_api.re.compile(r'^[^#]*"//third_party/junit')

warning_message = textwrap.dedent("""
The //build directory is meant to be as hermetic as possible so that
other projects (webrtc, v8, angle) can make use of it. If you are adding
a new dep from //build onto another directory, you should consider:
1) Can that dep live within //build?
2) Can the dep be guarded by "build_with_chromium"?
3) Have you made this new dep easy to pull in for other projects (ideally
a matter of adding a DEPS entry).:""")

def FilterFile(affected_file):
return input_api.FilterSourceFile(affected_file,
files_to_check=build_file_patterns)

problems = []
for f in input_api.AffectedSourceFiles(FilterFile):
local_path = f.LocalPath()
for line_number, line in f.ChangedContents():
if blocklist_pattern.search(line) and not allowlist_pattern.search(line):
problems.append('%s:%d\n %s' %
(local_path, line_number, line.strip()))
if problems:
return [output_api.PresubmitPromptOrNotify(warning_message, problems)]
else:
return []


def CheckPythonTests(input_api, output_api):
return input_api.RunTests(
input_api.canned_checks.GetUnitTestsInDirectory(
input_api,
output_api,
input_api.PresubmitLocalPath(),
files_to_check=[r'.+_(?:unit)?test\.py$'],
run_on_python2=False,
run_on_python3=True))
43 changes: 43 additions & 0 deletions build/PRESUBMIT_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env python3
# Copyright 2022 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import os
import sys
import unittest

import PRESUBMIT

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))

from PRESUBMIT_test_mocks import MockAffectedFile
from PRESUBMIT_test_mocks import MockInputApi, MockOutputApi

USE_PYTHON3 = True


def _fails_deps_check(line, filename='BUILD.gn'):
mock_input_api = MockInputApi()
mock_input_api.files = [MockAffectedFile(filename, [line])]
errors = PRESUBMIT.CheckNoBadDeps(mock_input_api, MockOutputApi())
return bool(errors)


class CheckNoBadDepsTest(unittest.TestCase):
def testComments(self):
self.assertFalse(_fails_deps_check('no # import("//third_party/foo")'))

def testFiles(self):
self.assertFalse(
_fails_deps_check('import("//third_party/foo")', filename='foo.txt'))
self.assertTrue(
_fails_deps_check('import("//third_party/foo")', filename='foo.gni'))

def testPaths(self):
self.assertFalse(_fails_deps_check('import("//build/things.gni")'))
self.assertTrue(_fails_deps_check('import("//chrome/things.gni")'))


if __name__ == '__main__':
unittest.main()
Loading

0 comments on commit 3c6b907

Please sign in to comment.