summaryrefslogtreecommitdiff
path: root/chromium/build/config
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-09-03 13:32:17 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-10-01 14:31:55 +0200
commit21ba0c5d4bf8fba15dddd97cd693bad2358b77fd (patch)
tree91be119f694044dfc1ff9fdc054459e925de9df0 /chromium/build/config
parent03c549e0392f92c02536d3f86d5e1d8dfa3435ac (diff)
downloadqtwebengine-chromium-21ba0c5d4bf8fba15dddd97cd693bad2358b77fd.tar.gz
BASELINE: Update Chromium to 92.0.4515.166
Change-Id: I42a050486714e9e54fc271f2a8939223a02ae364
Diffstat (limited to 'chromium/build/config')
-rw-r--r--chromium/build/config/BUILDCONFIG.gn2
-rw-r--r--chromium/build/config/android/BUILD.gn28
-rw-r--r--chromium/build/config/android/abi.gni11
-rw-r--r--chromium/build/config/android/android_nocompile.gni6
-rw-r--r--chromium/build/config/android/internal_rules.gni51
-rw-r--r--chromium/build/config/android/rules.gni73
-rw-r--r--chromium/build/config/chromeos/BUILD.gn1
-rw-r--r--chromium/build/config/chromeos/args.gni4
-rw-r--r--chromium/build/config/chromeos/rules.gni375
-rw-r--r--chromium/build/config/chromeos/ui_mode.gni5
-rw-r--r--chromium/build/config/compiler/BUILD.gn65
-rw-r--r--chromium/build/config/compiler/compiler.gni6
-rw-r--r--chromium/build/config/fuchsia/config.gni2
-rw-r--r--chromium/build/config/fuchsia/generate_runner_scripts.gni9
-rw-r--r--chromium/build/config/fuchsia/gfx_tests.cmx1
-rw-r--r--chromium/build/config/fuchsia/package.gni10
-rw-r--r--chromium/build/config/ios/BUILD.gn5
-rw-r--r--chromium/build/config/ios/ios_test_runner_wrapper.gni4
-rw-r--r--chromium/build/config/linux/gtk/BUILD.gn17
-rw-r--r--chromium/build/config/linux/gtk/gtk.gni5
-rw-r--r--chromium/build/config/linux/pangocairo/pangocairo.gni5
-rw-r--r--chromium/build/config/mac/rules.gni29
-rw-r--r--chromium/build/config/rts.gni5
-rw-r--r--chromium/build/config/sanitizers/BUILD.gn6
-rw-r--r--chromium/build/config/win/BUILD.gn8
25 files changed, 408 insertions, 325 deletions
diff --git a/chromium/build/config/BUILDCONFIG.gn b/chromium/build/config/BUILDCONFIG.gn
index 0ef73ab2b2e..46bc4769236 100644
--- a/chromium/build/config/BUILDCONFIG.gn
+++ b/chromium/build/config/BUILDCONFIG.gn
@@ -159,7 +159,7 @@ declare_args() {
# When false, components will be linked statically.
#
# For more information see
- # https://chromium.googlesource.com/chromium/src/+/master/docs/component_build.md
+ # https://chromium.googlesource.com/chromium/src/+/main/docs/component_build.md
is_component_build = is_debug && current_os != "ios"
}
diff --git a/chromium/build/config/android/BUILD.gn b/chromium/build/config/android/BUILD.gn
index 14151e4306f..8eed45e8090 100644
--- a/chromium/build/config/android/BUILD.gn
+++ b/chromium/build/config/android/BUILD.gn
@@ -61,32 +61,14 @@ config("compiler") {
# $compile_api_level corresponds to the API level used for the sysroot path
# calculation in //build/config/android/config.gni
- if (current_cpu == "arm") {
- abi_target = "arm-linux-androideabi"
- compile_api_level = android32_ndk_api_level
- } else if (current_cpu == "x86") {
- abi_target = "i686-linux-android"
- compile_api_level = android32_ndk_api_level
- } else if (current_cpu == "arm64") {
- abi_target = "aarch64-linux-android"
- compile_api_level = android64_ndk_api_level
- } else if (current_cpu == "x64") {
- # Place holder for x64 support, not tested.
- # TODO: Enable clang support for Android x64. http://crbug.com/539781
- abi_target = "x86_64-linux-android"
- compile_api_level = android64_ndk_api_level
- } else if (current_cpu == "mipsel") {
- abi_target = "mipsel-linux-android"
- compile_api_level = android32_ndk_api_level
- } else if (current_cpu == "mips64el") {
- # Place holder for mips64 support, not tested.
- abi_target = "mips64el-linux-android"
+ if (android_64bit_target_cpu) {
compile_api_level = android64_ndk_api_level
} else {
- assert(false, "Architecture not supported")
+ compile_api_level = android32_ndk_api_level
}
- cflags += [ "--target=$abi_target$compile_api_level" ]
- ldflags += [ "--target=$abi_target$compile_api_level" ]
+
+ cflags += [ "--target=$android_abi_target$compile_api_level" ]
+ ldflags += [ "--target=$android_abi_target$compile_api_level" ]
# Assign any flags set for the C compiler to asmflags so that they are sent
# to the assembler.
diff --git a/chromium/build/config/android/abi.gni b/chromium/build/config/android/abi.gni
index ed7c2ffc8be..53e57013588 100644
--- a/chromium/build/config/android/abi.gni
+++ b/chromium/build/config/android/abi.gni
@@ -38,6 +38,7 @@ assert(!use_call_graph || use_order_profiling,
if (current_cpu == "x86") {
android_app_abi = "x86"
+ android_abi_target = "i686-linux-android"
} else if (current_cpu == "arm") {
import("//build/config/arm.gni")
if (arm_version < 7) {
@@ -45,14 +46,24 @@ if (current_cpu == "x86") {
} else {
android_app_abi = "armeabi-v7a"
}
+ android_abi_target = "arm-linux-androideabi"
} else if (current_cpu == "mipsel") {
android_app_abi = "mips"
+ android_abi_target = "mipsel-linux-android"
} else if (current_cpu == "x64") {
android_app_abi = "x86_64"
+
+ # Place holder for x64 support, not tested.
+ # TODO: Enable clang support for Android x64. http://crbug.com/539781
+ android_abi_target = "x86_64-linux-android"
} else if (current_cpu == "arm64") {
android_app_abi = "arm64-v8a"
+ android_abi_target = "aarch64-linux-android"
} else if (current_cpu == "mips64el") {
android_app_abi = "mips64"
+
+ # Place holder for mips64 support, not tested.
+ android_abi_target = "mips64el-linux-android"
} else {
assert(false, "Unknown Android ABI: " + current_cpu)
}
diff --git a/chromium/build/config/android/android_nocompile.gni b/chromium/build/config/android/android_nocompile.gni
index 76cafd18b37..a99bad3cc49 100644
--- a/chromium/build/config/android/android_nocompile.gni
+++ b/chromium/build/config/android/android_nocompile.gni
@@ -3,7 +3,6 @@
# found in the LICENSE file.
import("//build/config/android/rules.gni")
-import("//build/config/python.gni")
declare_args() {
# Used by tests to enable generating build files for GN targets which should
@@ -32,7 +31,7 @@ declare_args() {
template("android_nocompile_test_suite") {
assert(!enable_android_nocompile_tests)
- python2_action(target_name) {
+ action(target_name) {
testonly = true
script = "//build/android/gyp/nocompile_test.py"
@@ -42,8 +41,7 @@ template("android_nocompile_test_suite") {
foreach(_test_config, _tests) {
assert(
_test0_dir == get_label_info(_test_config["target"], "dir"),
- "To avoid running 'gn gen' for each test, all tests in an " +
- "android_nocompile_test_suite() should be declared in same BUILD.gn file")
+ "To avoid running 'gn gen' for each test, all tests in an android_nocompile_test_suite() should be declared in same BUILD.gn file")
}
deps = []
diff --git a/chromium/build/config/android/internal_rules.gni b/chromium/build/config/android/internal_rules.gni
index 83f0c474b74..293c6d38ca7 100644
--- a/chromium/build/config/android/internal_rules.gni
+++ b/chromium/build/config/android/internal_rules.gni
@@ -396,10 +396,6 @@ template("write_build_config") {
rebase_path(invoker.res_size_info_path, root_build_dir),
]
}
- if (defined(invoker.resource_dirs)) {
- resource_dirs = rebase_path(invoker.resource_dirs, root_build_dir)
- args += [ "--resource-dirs=$resource_dirs" ]
- }
if (defined(invoker.res_sources_path)) {
_res_sources_path = rebase_path(invoker.res_sources_path, root_build_dir)
args += [ "--res-sources-path=$_res_sources_path" ]
@@ -1367,6 +1363,7 @@ if (enable_java_templates) {
# build_config: Path to .build_config for the jar (contains classpath).
# script_name: Name of the script to generate.
# wrapper_script_args: List of extra arguments to pass to the executable.
+ # tiered_stop_at_level_one: Whether to pass --tiered-stop-at-level-one
#
template("java_binary_script") {
action_with_pydeps(target_name) {
@@ -1401,6 +1398,10 @@ if (enable_java_templates) {
if (use_jacoco_coverage || !treat_warnings_as_errors) {
args += [ "--noverify" ]
}
+ if (defined(invoker.tiered_stop_at_level_one) &&
+ invoker.tiered_stop_at_level_one) {
+ args += [ "--tiered-stop-at-level-one" ]
+ }
if (defined(invoker.wrapper_script_args)) {
args += [ "--" ] + invoker.wrapper_script_args
}
@@ -2094,11 +2095,6 @@ if (enable_java_templates) {
#
# build_config: Path to the .build_config file corresponding to the target.
#
- # resource_dirs (Deprecated):
- # ** This is deprecated, please specify files using |sources| parameter **
- # List of directories containing Android resources, layout should be
- # similar to what aapt -S <dir> expects.
- #
# sources:
# List of input resource files.
#
@@ -2585,8 +2581,6 @@ if (enable_java_templates) {
_expectations_target =
"${invoker.top_target_name}_validate_android_manifest"
action_with_pydeps(_expectations_target) {
- # TODO(crbug.com/1187279): Get this to work under Python3.
- run_under_python2 = true
_actual_file = "${invoker.android_manifest}.normalized"
_failure_file =
"$expectations_failure_dir/" +
@@ -2639,8 +2633,6 @@ if (enable_java_templates) {
}
action_with_pydeps(target_name) {
- # TODO(crbug.com/1187279): Get this to work under Python3.
- run_under_python2 = true
script = _script
depfile = "$target_gen_dir/${target_name}.d"
inputs = _inputs
@@ -2653,6 +2645,38 @@ if (enable_java_templates) {
}
}
+ template("unused_resources") {
+ _rebased_build_config = rebase_path(invoker.build_config, root_build_dir)
+ _shrinker_dep = "//build/android/gyp/resources_shrinker:resources_shrinker"
+ _shrinker_script = "$root_build_dir/bin/helper/resources_shrinker"
+ action_with_pydeps(target_name) {
+ forward_variables_from(invoker, TESTONLY_AND_VISIBILITY + [ "deps" ])
+ script = "//build/android/gyp/resources_shrinker/shrinker.py"
+ inputs = [
+ invoker.build_config,
+ invoker.proguard_mapping_path,
+ _shrinker_script,
+ ]
+ outputs = [ invoker.output_config ]
+ if (!defined(deps)) {
+ deps = []
+ }
+ deps += [ _shrinker_dep ]
+ args = [
+ "--script",
+ rebase_path(_shrinker_script, root_build_dir),
+ "--dependencies-res-zips=@FileArg($_rebased_build_config:deps_info:dependency_zips)",
+ "--proguard-mapping",
+ rebase_path(invoker.proguard_mapping_path, root_build_dir),
+ "--r-text=@FileArg($_rebased_build_config:deps_info:r_text_path)",
+ "--dex=@FileArg($_rebased_build_config:final_dex:path)",
+ "--android-manifest=@FileArg($_rebased_build_config:deps_info:android_manifest)",
+ "--output-config",
+ rebase_path(invoker.output_config, root_build_dir),
+ ]
+ }
+ }
+
# Create an .jar.info file by merging several .jar.info files into one.
#
# Variables:
@@ -3995,6 +4019,7 @@ if (enable_java_templates) {
java_binary_script("${target_name}__java_binary_script") {
forward_variables_from(invoker,
[
+ "tiered_stop_at_level_one",
"main_class",
"wrapper_script_args",
])
diff --git a/chromium/build/config/android/rules.gni b/chromium/build/config/android/rules.gni
index 2f7b6441dcf..b411f154af3 100644
--- a/chromium/build/config/android/rules.gni
+++ b/chromium/build/config/android/rules.gni
@@ -12,6 +12,7 @@ import("//build/config/clang/clang.gni")
import("//build/config/compiler/compiler.gni")
import("//build/config/coverage/coverage.gni")
import("//build/config/python.gni")
+import("//build/config/rts.gni")
import("//build/config/zip.gni")
import("//build/toolchain/toolchain.gni")
@@ -724,12 +725,6 @@ if (enable_java_templates) {
"--native-libraries-list",
rebase_path(invoker.native_libraries_list_file, root_build_dir),
]
- if (defined(invoker.version_number)) {
- args += [
- "--version-number",
- invoker.version_number,
- ]
- }
if (defined(invoker.main_component_library)) {
args += [
"--main-component-library",
@@ -997,10 +992,6 @@ if (enable_java_templates) {
not_needed(invoker, [ "v14_skip" ])
}
- assert(!defined(invoker.resource_dirs) || defined(invoker.sources),
- "resource_dirs in android_resources is deprecated. Please use " +
- "sources=[] and list resource files instead. Details: " +
- "https://crbug.com/1026378")
_res_sources_path = "$target_gen_dir/${invoker.target_name}.res.sources"
_resources_zip = "$target_out_dir/$target_name.resources.zip"
@@ -1372,6 +1363,12 @@ if (enable_java_templates) {
testonly = true
main_class = _main_class
wrapper_script_name = "helper/$main_target_name"
+
+ # As of April 2021, adding -XX:TieredStopAtLevel=1 does not affect the
+ # wall time of a single robolectric shard, but does reduce the CPU time by
+ # 66%, which makes sharding more effective.
+ tiered_stop_at_level_one = true
+
if (!defined(srcjar_deps)) {
srcjar_deps = []
}
@@ -2331,7 +2328,7 @@ if (enable_java_templates) {
_generate_productconfig_java = defined(invoker.product_config_java_packages)
# JNI generation usually goes hand-in-hand with buildconfig generation.
- _generate_final_jni = _generate_buildconfig_java && build_with_chromium
+ _generate_final_jni = _generate_buildconfig_java
if (defined(invoker.generate_final_jni)) {
_generate_final_jni = invoker.generate_final_jni
}
@@ -2637,13 +2634,6 @@ if (enable_java_templates) {
if (_generate_native_libraries_java) {
write_native_libraries_java("${_template_name}__native_libraries") {
forward_variables_from(invoker, [ "main_component_library" ])
- deps = []
- if (defined(invoker.native_lib_version_rule)) {
- deps += [ invoker.native_lib_version_rule ]
- }
- if (defined(invoker.native_lib_version_arg)) {
- version_number = invoker.native_lib_version_arg
- }
# Do not add a dep on the generated_file target in order to avoid having
# to build the native libraries before this target. The dependency is
@@ -2659,13 +2649,6 @@ if (enable_java_templates) {
use_final_fields = true
}
_srcjar_deps += [ ":${_template_name}__native_libraries" ]
- } else {
- if (defined(invoker.native_lib_version_arg)) {
- not_needed(invoker, [ "native_lib_version_arg" ])
- }
- if (defined(invoker.native_lib_version_rule)) {
- not_needed(invoker, [ "native_lib_version_rule" ])
- }
}
_loadable_modules = []
@@ -3484,8 +3467,6 @@ if (enable_java_templates) {
"main_component_library",
"min_sdk_version",
"native_lib_placeholders",
- "native_lib_version_arg",
- "native_lib_version_rule",
"never_incremental",
"no_xml_namespaces",
"png_to_webp",
@@ -3617,8 +3598,6 @@ if (enable_java_templates) {
"max_sdk_version",
"min_sdk_version",
"native_lib_placeholders",
- "native_lib_version_arg",
- "native_lib_version_rule",
"no_xml_namespaces",
"package_id",
"package_name",
@@ -3693,6 +3672,14 @@ if (enable_java_templates) {
# apk_under_test: ":bar"
# }
template("instrumentation_test_runner") {
+ if (use_rts) {
+ action("${invoker.target_name}__rts_filters") {
+ script = "//build/add_rts_filters.py"
+ rts_file = "${root_build_dir}/gen/rts/${invoker.target_name}.filter"
+ args = [ rebase_path(rts_file, root_build_dir) ]
+ outputs = [ rts_file ]
+ }
+ }
test_runner_script(target_name) {
forward_variables_from(invoker,
[
@@ -3731,6 +3718,12 @@ if (enable_java_templates) {
if (defined(invoker.additional_apks)) {
public_deps += invoker.additional_apks
}
+ if (use_rts) {
+ if (!defined(data_deps)) {
+ data_deps = []
+ }
+ data_deps += [ ":${invoker.target_name}__rts_filters" ]
+ }
}
}
@@ -3948,14 +3941,16 @@ if (enable_java_templates) {
final_apk_path = "$root_build_dir/${apk_name}_apk/${apk_name}-debug.apk"
if (!defined(use_default_launcher) || use_default_launcher) {
- deps += [ "//testing/android/native_test:native_test_java" ]
+ deps += [
+ "//base:base_java",
+ "//build/android/gtest_apk:native_test_instrumentation_test_runner_java",
+ "//testing/android/native_test:native_test_java",
+ ]
}
shared_libraries = [ invoker.shared_library ]
deps += [
":${target_name}__secondary_abi_shared_library_list",
":${target_name}__shared_library_list",
- "//base:base_java",
- "//testing/android/reporter:reporter_java",
]
}
}
@@ -3984,6 +3979,7 @@ if (enable_java_templates) {
forward_variables_from(invoker, TESTONLY_AND_VISIBILITY)
script = "//build/android/gyp/aidl.py"
+ depfile = "$target_gen_dir/$target_name.d"
sources = invoker.sources
_srcjar_path = "${target_gen_dir}/${target_name}.srcjar"
@@ -4005,22 +4001,15 @@ if (enable_java_templates) {
"--imports=$_rebased_imports",
"--srcjar",
rebase_path(_srcjar_path, root_build_dir),
+ "--depfile",
+ rebase_path(depfile, root_build_dir),
]
if (defined(invoker.import_include) && invoker.import_include != []) {
- # TODO(cjhopman): aidl supports creating a depfile. We should be able to
- # switch to constructing a depfile for the overall action from that
- # instead of having all the .java files in the include paths as inputs.
_rebased_import_paths = []
foreach(_import_path, invoker.import_include) {
_rebased_import_path = []
_rebased_import_path = [ rebase_path(_import_path, root_build_dir) ]
_rebased_import_paths += _rebased_import_path
- _java_files_build_rel = []
- _java_files_build_rel =
- exec_script("//build/android/gyp/find.py",
- [ "--pattern=*.java" ] + _rebased_import_path,
- "list lines")
- inputs += rebase_path(_java_files_build_rel, ".", root_build_dir)
}
args += [ "--includes=$_rebased_import_paths" ]
}
@@ -4839,8 +4828,6 @@ if (enable_java_templates) {
_bundle_target_name = "${_target_name}__bundle"
action_with_pydeps(_bundle_target_name) {
- # TODO(crbug.com/1187279): Get this to work under Python3.
- run_under_python2 = true
script = "//build/android/gyp/create_app_bundle.py"
inputs = _all_module_zip_paths + _all_module_build_configs
outputs = [ _bundle_path ]
diff --git a/chromium/build/config/chromeos/BUILD.gn b/chromium/build/config/chromeos/BUILD.gn
index db172937a6b..f3dfe70d424 100644
--- a/chromium/build/config/chromeos/BUILD.gn
+++ b/chromium/build/config/chromeos/BUILD.gn
@@ -2,7 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import("//build/config/chromeos/rules.gni")
import("//build/config/chromeos/ui_mode.gni")
assert(is_chromeos_ash)
diff --git a/chromium/build/config/chromeos/args.gni b/chromium/build/config/chromeos/args.gni
index 3be4f27297f..5ae6277454a 100644
--- a/chromium/build/config/chromeos/args.gni
+++ b/chromium/build/config/chromeos/args.gni
@@ -21,7 +21,7 @@ declare_args() {
# linux-chromeos, so some have compile-time asserts that intentionally fail
# when this build flag is set. Build and run the tests for linux-chromeos
# instead.
- # https://chromium.googlesource.com/chromium/src/+/master/docs/chromeos_build_instructions.md
- # https://chromium.googlesource.com/chromiumos/docs/+/master/simple_chrome_workflow.md
+ # https://chromium.googlesource.com/chromium/src/+/main/docs/chromeos_build_instructions.md
+ # https://chromium.googlesource.com/chromiumos/docs/+/main/simple_chrome_workflow.md
is_chromeos_device = false
}
diff --git a/chromium/build/config/chromeos/rules.gni b/chromium/build/config/chromeos/rules.gni
index 1095fd06748..0ccbcb22a18 100644
--- a/chromium/build/config/chromeos/rules.gni
+++ b/chromium/build/config/chromeos/rules.gni
@@ -7,13 +7,14 @@ import("//build/config/chromeos/args.gni")
import("//build/config/chromeos/ui_mode.gni")
import("//build/config/gclient_args.gni")
import("//build/config/python.gni")
+import("//build/util/generate_wrapper.gni")
-assert(is_chromeos_ash || is_chromeos_lacros)
+assert((is_chromeos_ash || is_chromeos_lacros) && is_chromeos_device)
# Determine the real paths for various items in the SDK, which may be used
# in the 'generate_runner_script' template below. We do so outside the template
# to confine exec_script to a single invocation.
-if (is_chromeos_device && cros_sdk_version != "") {
+if (cros_sdk_version != "") {
# Ideally these should be maps, however, gn doesn't support map, so using a
# list of list to simulate a map:
# [key1, [value1, value2, ...]], [key2, [value1, value2, ...]], where
@@ -30,22 +31,26 @@ if (is_chromeos_device && cros_sdk_version != "") {
_symlink_map = []
_symlink_targets_map = []
- _boards = [ cros_board ]
- if (cros_boards != "") {
- _boards += string_split(cros_boards, ":")
- }
- if (cros_boards_with_qemu_images != "") {
- _boards += string_split(cros_boards_with_qemu_images, ":")
+ if (is_chromeos_ash) {
+ _potential_test_boards = [ cros_board ]
+ } else {
+ _potential_test_boards = []
+ if (cros_boards != "") {
+ _potential_test_boards += string_split(cros_boards, ":")
+ }
+ if (cros_boards_with_qemu_images != "") {
+ _potential_test_boards += string_split(cros_boards_with_qemu_images, ":")
+ }
}
- foreach(b, _boards) {
+ foreach(b, _potential_test_boards) {
_cache_path_prefix =
"//build/cros_cache/chrome-sdk/symlinks/${b}+${cros_sdk_version}"
- cros_is_vm = false
+ _cros_is_vm = false
foreach(b1, string_split(cros_boards_with_qemu_images, ":")) {
if (b == b1) {
- cros_is_vm = true
+ _cros_is_vm = true
}
}
@@ -60,7 +65,7 @@ if (is_chromeos_device && cros_sdk_version != "") {
"${_cache_path_prefix}+environment_chromeos-base_chromeos-chrome.tar.xz"),
rebase_path("${_cache_path_prefix}+target_toolchain"),
]
- if (cros_is_vm) {
+ if (_cros_is_vm) {
# VM-related tools.
_symlinks += [
rebase_path("${_cache_path_prefix}+sys-firmware/seabios"),
@@ -107,25 +112,27 @@ if (is_chromeos_device && cros_sdk_version != "") {
# results tracking and displaying (eg: flakiness dashboard).
# generated_script: Path to place the generated script.
# deploy_chrome: If true, deploys a locally built chrome located in the root
-# build dir to the VM after launching it.
+# build dir to the VM or DUT after launching it.
+# deploy_lacros: If true, deploys a locally built Lacros located in the root
+# build dir to the VM or DUT after launching it.
# runtime_deps_file: Path to file listing runtime deps for the test. If set,
# all files listed will be copied to the VM before testing.
-# override_board: "cros_board" variable was used to decide both the toolchain
-# to build Chrome and the DUTs to test the binary, however, with the
-# introduction of Lacros, this is not true anymore: a Lacros chrome can be
-# built by an amd64-generic toolchain, but tested on eve devices, and to
-# accommondate the use case, this variable is introduced to allow
-# overriding the board to test the built binary.
+# skip_generating_board_args: By default, this template generates an '--board'
+# arg with corresponding '--flash' or '--use-vm' args for device and vm
+# respectively. This argument instructs the template to skip generating
+# them, and it's designed for use cases where one builds for one board
+# (e.g. amd64-generic), but tests on a different board (e.g. eve).
# tast_vars: A list of "key=value" runtime variable pairs to pass to invoke
# the Tast tests. For more details, please see:
# https://chromium.googlesource.com/chromiumos/platform/tast/+/HEAD/docs/writing_tests.md#Runtime-variables
template("generate_runner_script") {
forward_variables_from(invoker,
[
- "override_board",
"deploy_chrome",
+ "deploy_lacros",
"generated_script",
"runtime_deps_file",
+ "skip_generating_board_args",
"tast_attr_expr",
"tast_tests",
"tast_vars",
@@ -133,88 +140,199 @@ template("generate_runner_script") {
"test_exe",
])
- if (defined(override_board)) {
- cros_board = override_board
+ if (!defined(skip_generating_board_args)) {
+ skip_generating_board_args = false
+ }
+
+ if (skip_generating_board_args) {
+ # cros_board is not needed, so setting it to empty to avoid being used
+ # accidentally below.
+ cros_board = ""
+ not_needed([ cros_board ])
+ }
+
+ if (!defined(deploy_chrome)) {
+ deploy_chrome = false
+ }
+ if (!defined(deploy_lacros)) {
+ deploy_lacros = false
}
+ assert(!(deploy_chrome && deploy_lacros),
+ "deploy_chrome and deploy_lacros are exclusive.")
- cros_is_vm = false
is_tast = defined(tast_attr_expr) || defined(tast_tests)
- if (is_chromeos_device && cros_sdk_version != "") {
+ assert(!(is_tast && defined(test_exe)),
+ "Tast tests are invoked from binaries shipped with the VM image. " +
+ "There should be no locally built binary needed.")
+ assert(is_tast || !defined(tast_vars),
+ "tast_vars is only support for Tast tests")
+
+ # If we're in the cros chrome-sdk (and not the raw ebuild), the test will
+ # need some additional runtime data located in the SDK cache.
+ _sdk_data = []
+ if (cros_sdk_version != "") {
assert(defined(generated_script),
"Must specify where to place generated test launcher script via " +
"'generated_script'")
- assert(!(is_tast && defined(test_exe)),
- "Tast tests are invoked from binaries shipped with the VM image. " +
- "There should be no locally built binary needed.")
- assert(is_tast || !defined(tast_vars),
- "tast_vars is only support for Tast tests")
-
- # Determine the real paths for various items in the SDK, which may be used
- # in the 'generate_runner_script' template below.
- foreach(b, string_split(cros_boards_with_qemu_images, ":")) {
- if (cros_board == b) {
- cros_is_vm = true
+
+ foreach(b, _potential_test_boards) {
+ _cros_is_vm = false
+ foreach(b1, string_split(cros_boards_with_qemu_images, ":")) {
+ if (b == b1) {
+ _cros_is_vm = true
+ }
}
- }
- if (!defined(deploy_chrome)) {
- deploy_chrome = false
- }
+ # Determine the real paths for various items in the SDK, which may be used
+ # in the 'generate_runner_script' template below.
+ if (is_tast || _cros_is_vm || deploy_chrome) {
+ _symlink_targets = []
+ foreach(m, _symlink_targets_map) {
+ if (b == m[0]) {
+ _symlink_targets = []
+ _symlink_targets = m[1]
+ }
+ }
- if (is_tast || cros_is_vm || deploy_chrome) {
- _symlink_targets = []
- foreach(m, _symlink_targets_map) {
- if (cros_board == m[0]) {
- _symlink_targets = []
- _symlink_targets = m[1]
+ if (is_tast) {
+ # Add tast sdk items.
+ _sdk_data += [
+ _symlink_targets[0],
+ _symlink_targets[1],
+ ]
+ }
+ if (deploy_chrome) {
+ # To deploy chrome to the VM, it needs to be stripped down to fit into
+ # the VM. This is done by using binutils in the toolchain. So add the
+ # toolchain to the data.
+ _sdk_data += [
+ _symlink_targets[2],
+ _symlink_targets[3],
+ ]
+ }
+ if (_cros_is_vm) {
+ # Add vm sdk items.
+ _sdk_data += [
+ _symlink_targets[4],
+ _symlink_targets[5],
+ _symlink_targets[6],
+ ]
}
}
+ }
+ }
+
+ generate_wrapper(target_name) {
+ executable = "//build/chromeos/test_runner.py"
+ use_vpython3 = true
+ wrapper_script = generated_script
+ executable_args = []
+
+ if (defined(runtime_deps_file)) {
+ write_runtime_deps = runtime_deps_file
+ }
- if (is_tast) {
- _tast_sdk_items = [
- _symlink_targets[0],
- _symlink_targets[1],
+ # Build executable_args for the three different test types: GTest, Tast,
+ # and host-side commands (eg telemetry).
+ if (defined(test_exe)) {
+ executable_args += [
+ "gtest",
+ "--test-exe",
+ test_exe,
+ ]
+ if (defined(runtime_deps_file)) {
+ executable_args += [
+ "--runtime-deps-path",
+ rebase_path(runtime_deps_file, root_build_dir),
]
}
- if (deploy_chrome) {
- _toolchain_sdk_items = [
- _symlink_targets[2],
- _symlink_targets[3],
+ } else if (is_tast) {
+ # When --tast-tests is specified, test_runner.py will call
+ # local_test_runner on the VM to run the set of tests.
+ executable_args += [
+ "tast",
+ "--suite-name",
+ target_name,
+ ]
+ if (defined(tast_attr_expr)) {
+ executable_args += [
+ "--attr-expr",
+ tast_attr_expr,
]
+ } else {
+ foreach(test, tast_tests) {
+ executable_args += [
+ "-t",
+ test,
+ ]
+ }
}
- if (cros_is_vm) {
- _vm_sdk_items = [
- _symlink_targets[4],
- _symlink_targets[5],
- _symlink_targets[6],
- ]
+ if (defined(tast_vars)) {
+ foreach(var, tast_vars) {
+ executable_args += [
+ "--tast-var",
+ var,
+ ]
+ }
}
+ } else {
+ executable_args += [ "host-cmd" ]
}
- }
+ executable_args += [
+ "--cros-cache",
+ "build/cros_cache/",
+ "--path-to-outdir",
+ rebase_path(root_out_dir, "//"),
+ "-v",
+ ]
- # TODO(crbug.com/1112471): Get this to run cleanly under Python 3.
- python2_action(target_name) {
- if (defined(runtime_deps_file)) {
- write_runtime_deps = runtime_deps_file
+ if (!skip_generating_board_args) {
+ executable_args += [
+ "--board",
+ cros_board,
+ ]
+
+ _cros_is_vm = false
+ foreach(b, string_split(cros_boards_with_qemu_images, ":")) {
+ if (cros_board == b) {
+ _cros_is_vm = true
+ }
+ }
+ if (_cros_is_vm) {
+ executable_args += [ "--use-vm" ]
+ } else {
+ executable_args += [ "--flash" ]
+ }
}
- script = "//build/chromeos/create_test_runner_script.py"
- outputs = [ generated_script ]
+ # If we have public Chromium builds, use public Chromium OS images when
+ # flashing the test device.
+ if (!is_chrome_branded) {
+ executable_args += [ "--public-image" ]
+ }
+
+ if (deploy_lacros) {
+ executable_args += [ "--deploy-lacros" ]
+ }
+
+ if (deploy_chrome && !defined(test_exe) && !is_tast) {
+ executable_args += [ "--deploy-chrome" ]
+ }
+ # executable_args should be finished, now build the data and deps lists.
deps = [ "//testing/buildbot/filters:chromeos_filters" ]
if (defined(invoker.deps)) {
deps += invoker.deps
}
-
data = [
"//.vpython",
+ "//.vpython3",
# We use android test-runner's results libs to construct gtest output
# json.
"//build/android/pylib/__init__.py",
"//build/android/pylib/base/",
"//build/android/pylib/results/",
- generated_script,
"//build/chromeos/",
# Needed for various SDK components used below.
@@ -227,109 +345,16 @@ template("generate_runner_script") {
"//third_party/chromite/",
]
+ data += _sdk_data
+
if (defined(invoker.data)) {
data += invoker.data
}
data_deps = [ "//testing:test_scripts_shared" ]
-
if (defined(invoker.data_deps)) {
data_deps += invoker.data_deps
}
-
- # Required arguments used at build time by the runner script generator.
- args = [
- "--script-output-path",
- rebase_path(generated_script, root_build_dir),
- "--cros-cache",
- rebase_path("//build/cros_cache/", root_build_dir),
- "--board",
- cros_board,
- "--output-directory",
- rebase_path(root_out_dir, root_build_dir),
- ]
-
- if (cros_is_vm) {
- args += [ "--use-vm" ]
- } else {
- args += [ "--flash" ]
- }
-
- # If we have public Chromium builds, use public Chromium OS images when
- # flashing the test device.
- if (!is_chrome_branded) {
- args += [ "--public-image" ]
- }
-
- if (deploy_chrome) {
- args += [ "--deploy-chrome" ]
- }
-
- if (is_chromeos_lacros) {
- args += [ "--deploy-lacros" ]
- }
-
- # If we're in the cros chrome-sdk (and not the raw ebuild), the test will
- # need some additional runtime data located in the SDK cache.
- if (cros_sdk_version != "") {
- # Add the VM/QEMU-launching bits if needed.
- if (cros_is_vm) {
- data += _vm_sdk_items
- }
- if (is_tast) {
- data += _tast_sdk_items
- }
- if (deploy_chrome) {
- # To deploy chrome to the VM, it needs to be stripped down to fit into
- # the VM. This is done by using binutils in the toolchain. So add the
- # toolchain to the data.
- data += _toolchain_sdk_items
- }
- }
-
- # When --test-exe is specified, test_runner.py will push the exe to the VM
- # and execute it. Otherwise it wraps a host-side command and just takes care
- # launching & tearing-down the VM.
- if (defined(test_exe)) {
- args += [
- "--test-exe",
- test_exe,
- ]
- if (defined(runtime_deps_file)) {
- args += [
- "--runtime-deps-path",
- rebase_path(runtime_deps_file, root_build_dir),
- ]
- }
- } else if (is_tast) {
- # When --tast-tests is specified, test_runner.py will call
- # local_test_runner on the VM to run the set of tests.
- args += [
- "--suite-name",
- target_name,
- ]
- if (defined(tast_attr_expr)) {
- args += [
- "--tast-attr-expr",
- tast_attr_expr,
- ]
- } else {
- foreach(test, tast_tests) {
- args += [
- "--tast-tests",
- test,
- ]
- }
- }
- if (defined(tast_vars)) {
- foreach(var, tast_vars) {
- args += [
- "--tast-var",
- var,
- ]
- }
- }
- }
}
}
@@ -340,7 +365,7 @@ template("tast_test") {
if (!defined(tast_attr_expr) && !defined(tast_tests)) {
# The following expression filters out all non-critical tests. See the link
# below for more details:
- # https://chromium.googlesource.com/chromiumos/platform/tast/+/master/docs/test_attributes.md
+ # https://chromium.googlesource.com/chromiumos/platform/tast/+/main/docs/test_attributes.md
tast_attr_expr = "\"group:mainline\" && \"dep:chrome\""
if (defined(enable_tast_informational_tests) &&
@@ -389,10 +414,9 @@ template("tast_test") {
}
}
-template("lacros_tast_test") {
+template("lacros_tast_tests") {
forward_variables_from(invoker,
[
- "override_board",
"tast_attr_expr",
"tast_disabled_tests",
"tast_tests",
@@ -414,20 +438,22 @@ template("lacros_tast_test") {
generate_runner_script(target_name) {
testonly = true
+ deploy_lacros = true
generated_script = "$root_build_dir/bin/run_${target_name}"
runtime_deps_file = "$root_out_dir/${target_name}.runtime_deps"
+ # At build time, Lacros tests don't know whether they'll run on VM or HW,
+ # and instead, these flags are specified at runtime when invoking the
+ # generated runner script.
+ skip_generating_board_args = true
+
# By default, tast tests download a lacros-chrome from a gcs location and
# use it for testing. To support running lacros tast tests from Chromium CI,
# a Var is added to support pointing the tast tests to use a specified
# pre-deployed lacros-chrome. The location is decided by:
- # https://source.chromium.org/chromium/chromium/src/+/master:third_party/chromite/scripts/deploy_chrome.py;l=80;drc=86f1234a4be8e9574442e076cdc835897f7bea61
+ # https://source.chromium.org/chromium/chromium/src/+/main:third_party/chromite/scripts/deploy_chrome.py;l=80;drc=86f1234a4be8e9574442e076cdc835897f7bea61
tast_vars = [ "lacrosDeployedBinary=/usr/local/lacros-chrome" ]
- # Lacros tast tests may have different test expectations based on whether
- # they're for Chromium or Chrome.
- tast_vars += [ "lacrosIsChromeBranded=$is_chrome_branded" ]
-
data_deps = [
"//chrome", # Builds the browser.
@@ -439,6 +465,11 @@ template("lacros_tast_test") {
"//third_party/breakpad:minidump_stackwalk",
]
- data = [ "//components/crash/content/tools/generate_breakpad_symbols.py" ]
+ data = [
+ "//components/crash/content/tools/generate_breakpad_symbols.py",
+
+ # A script needed to launch Lacros in Lacros Tast tests.
+ "//build/lacros/mojo_connection_lacros_launcher.py",
+ ]
}
}
diff --git a/chromium/build/config/chromeos/ui_mode.gni b/chromium/build/config/chromeos/ui_mode.gni
index df578bc929f..208969e006f 100644
--- a/chromium/build/config/chromeos/ui_mode.gni
+++ b/chromium/build/config/chromeos/ui_mode.gni
@@ -30,7 +30,4 @@ declare_args() {
# is_chromeos_{ash,lacros} should be set true only for builds with target
# toolchains.
is_chromeos_ash = is_chromeos && !chromeos_is_browser_only
-
-# TODO(crbug.com/1052397): Remove is_linux once lacros-chrome switches
-# to target_os=chromeos
-is_chromeos_lacros = (is_chromeos || is_linux) && chromeos_is_browser_only
+is_chromeos_lacros = is_chromeos && chromeos_is_browser_only
diff --git a/chromium/build/config/compiler/BUILD.gn b/chromium/build/config/compiler/BUILD.gn
index 72ea590d696..96545ed8a9e 100644
--- a/chromium/build/config/compiler/BUILD.gn
+++ b/chromium/build/config/compiler/BUILD.gn
@@ -46,6 +46,17 @@ if (is_nacl) {
import("//build/config/nacl/config.gni")
}
+lld_path = ""
+if (!is_clang) {
+ declare_args() {
+ # This allows overriding the location of lld.
+ lld_path = rebase_path("$clang_base_path/bin", root_build_dir)
+ }
+} else {
+ # clang looks for lld next to it, no need for -B.
+ lld_path = ""
+}
+
declare_args() {
# Normally, Android builds are lightly optimized, even for debug builds, to
# keep binary size down. Setting this flag to true disables such optimization
@@ -149,7 +160,7 @@ declare_args() {
enable_wmax_tokens =
!is_official_build &&
((is_mac && target_cpu == "x64" && !use_system_xcode) ||
- ((is_linux || is_chromeos_lacros) && target_cpu == "x64") ||
+ (is_linux && !is_chromeos && target_cpu == "x64") ||
(is_win && target_cpu == "x86") || (is_win && target_cpu == "x64") ||
(is_android && target_cpu == "arm") ||
(is_android && target_cpu == "arm64"))
@@ -330,6 +341,9 @@ config("compiler") {
if (use_lld) {
ldflags += [ "-fuse-ld=lld" ]
+ if (lld_path != "") {
+ ldflags += [ "-B$lld_path" ]
+ }
}
# Linker warnings.
@@ -438,7 +452,7 @@ config("compiler") {
# Linux-specific compiler flags setup.
# ------------------------------------
- if ((is_posix || is_fuchsia) && use_lld) {
+ if ((is_posix || is_fuchsia) && !is_apple && use_lld) {
if (current_cpu == "arm64") {
# Reduce the page size from 65536 in order to reduce binary size slightly
# by shrinking the alignment gap between segments. This also causes all
@@ -684,9 +698,7 @@ config("compiler") {
ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ]
}
- # Whole-program devirtualization increases android libchrome.so size
- # by ~100kb on arm32 and reduces it by ~108kb on arm64 instead.
- # Tracked by llvm bug: https://bugs.llvm.org/show_bug.cgi?id=48245
+ # TODO(https://crbug.com/1211155): investigate why this isn't effective on arm32.
if (!is_android || current_cpu == "arm64") {
cflags += [ "-fwhole-program-vtables" ]
if (!is_win) {
@@ -738,7 +750,10 @@ config("compiler") {
if (is_clang && !is_nacl && show_includes) {
assert(!is_win, "show_includes is not supported on Windows")
- cflags += [ "-H" ]
+ cflags += [
+ "-H",
+ "-fshow-skipped-includes",
+ ]
}
# This flag enforces that member pointer base types are complete. It helps
@@ -751,11 +766,6 @@ config("compiler") {
cflags += [ "-fcomplete-member-pointers" ]
}
- # TODO(crbug/1185183): Remove after next clang roll
- if (is_clang && !is_nacl && is_linux && is_msan) {
- cflags += [ "-flegacy-pass-manager" ]
- }
-
# Pass the same C/C++ flags to the objective C/C++ compiler.
cflags_objc += cflags_c
cflags_objcc += cflags_cc
@@ -1267,7 +1277,7 @@ config("compiler_arm_thumb") {
}
config("compiler_arm") {
- if (current_cpu == "arm" && is_chromeos_ash) {
+ if (current_cpu == "arm" && (is_chromeos_ash || is_chromeos_lacros)) {
# arm is normally the default mode for clang, but on chromeos a wrapper
# is used to pass -mthumb, and therefor change the default.
cflags = [ "-marm" ]
@@ -1677,6 +1687,11 @@ config("chromium_code") {
cflags_objc = [ "-Wobjc-missing-property-synthesis" ]
cflags_objcc = [ "-Wobjc-missing-property-synthesis" ]
}
+
+ if (is_ios) {
+ cflags_objc = [ "-Wimplicit-retain-self" ]
+ cflags_objcc = cflags_objc
+ }
}
if (is_clang) {
@@ -1756,7 +1771,7 @@ config("no_chromium_code") {
]
if (!is_nacl && (current_toolchain == host_toolchain || !use_xcode_clang)) {
cflags += [
- # TODO(https://crbug.com/1031169): Clean up and enable.
+ # TODO(https://crbug.com/1202159): Clean up and enable.
"-Wno-misleading-indentation",
]
}
@@ -2337,15 +2352,8 @@ config("symbols") {
# All configs using /DEBUG should include this:
configs = [ ":win_pdbaltpath" ]
- if (is_clang) {
- # Use constructor debug mode. This option reduces debug info more than
- # -fno-standalone-debug by emitting class type information only when
- # constructors are emitted.
- cflags += [
- "-Xclang",
- "-debug-info-kind=constructor",
- ]
- }
+ # TODO(crbug.com/1138553): Re-enable constructor homing on windows after
+ # libc++ fix is in.
} else {
cflags = []
if (is_mac && enable_dsyms) {
@@ -2426,7 +2434,13 @@ config("minimal_symbols") {
if (is_win) {
# Functions, files, and line tables only.
cflags = []
- ldflags = [ "/DEBUG" ]
+
+ if (is_clang && use_lld && use_ghash) {
+ cflags += [ "-gcodeview-ghash" ]
+ ldflags = [ "/DEBUG:GHASH" ]
+ } else {
+ ldflags = [ "/DEBUG" ]
+ }
# All configs using /DEBUG should include this:
configs = [ ":win_pdbaltpath" ]
@@ -2569,7 +2583,10 @@ config("default_init_stack_vars") {
buildflag_header("compiler_buildflags") {
header = "compiler_buildflags.h"
- flags = [ "CLANG_PGO=$chrome_pgo_phase" ]
+ flags = [
+ "CLANG_PGO=$chrome_pgo_phase",
+ "SYMBOL_LEVEL=$symbol_level",
+ ]
}
config("cet_shadow_stack") {
diff --git a/chromium/build/config/compiler/compiler.gni b/chromium/build/config/compiler/compiler.gni
index 96a18d91a3f..572d7a8a45d 100644
--- a/chromium/build/config/compiler/compiler.gni
+++ b/chromium/build/config/compiler/compiler.gni
@@ -105,7 +105,7 @@ declare_args() {
# Technology (CET). If Windows version and hardware supports the feature and
# it's enabled by OS then additional validation of return address will be
# performed as mitigation against Return-oriented programming (ROP).
- # https://chromium.googlesource.com/chromium/src/+/master/docs/design/sandbox.md#cet-shadow-stack
+ # https://chromium.googlesource.com/chromium/src/+/main/docs/design/sandbox.md#cet-shadow-stack
enable_cet_shadow_stack = target_cpu == "x64"
}
@@ -129,7 +129,7 @@ declare_args() {
# and build arguments.
# TODO(crbug.com/1052397): Consider changing is_chromeos_ash to is_chromeos after
# lacros-chrome switches to target_os="chromeos".
-if (is_chromeos_ash) {
+if (is_chromeos_ash || is_chromeos_lacros) {
# ChromeOS generally prefers frame pointers, to support CWP.
# However, Clang does not currently generate usable frame pointers in ARM
# 32-bit builds (https://bugs.llvm.org/show_bug.cgi?id=18505) so disable them
@@ -216,7 +216,7 @@ declare_args() {
# results independent of the checkout and build directory names, which
# in turn is important for goma compile hit rate.
# Setting this to true may make it harder to debug binaries on Linux, see
-# https://chromium.googlesource.com/chromium/src/+/master/docs/linux/debugging.md#Source-level-debug-with-fdebug_compilation_dir
+# https://chromium.googlesource.com/chromium/src/+/main/docs/linux/debugging.md#Source-level-debug-with-fdebug_compilation_dir
# It's not clear if the crash server will correctly handle dSYMs with relative
# paths, so we disable this feature for official benefit. The main benefit is
# deterministic builds to reduce compile times, so this is less relevant for
diff --git a/chromium/build/config/fuchsia/config.gni b/chromium/build/config/fuchsia/config.gni
index 8e9e2be639a..5a00cc5a85d 100644
--- a/chromium/build/config/fuchsia/config.gni
+++ b/chromium/build/config/fuchsia/config.gni
@@ -5,7 +5,7 @@
assert(is_fuchsia)
# Compute the AEMU path.
-aemu_root = "//third_party/aemu-${host_os}-${host_cpu}"
+aemu_root = "//third_party/aemu-${host_os}-${target_cpu}"
# Compute the path to the arch-specific boot image directory.
boot_image_root = "//third_party/fuchsia-sdk/images/${target_cpu}"
diff --git a/chromium/build/config/fuchsia/generate_runner_scripts.gni b/chromium/build/config/fuchsia/generate_runner_scripts.gni
index 0f6cd35580a..d9a67521ee6 100644
--- a/chromium/build/config/fuchsia/generate_runner_scripts.gni
+++ b/chromium/build/config/fuchsia/generate_runner_scripts.gni
@@ -142,7 +142,12 @@ template("fuchsia_package_runner") {
"//third_party/fuchsia-sdk/sdk/tools/${test_host_cpu}/fvm",
"//third_party/fuchsia-sdk/sdk/tools/${test_host_cpu}/merkleroot",
"//third_party/fuchsia-sdk/sdk/tools/${test_host_cpu}/pm",
+
+ # TODO(crbug.com/1162314) Remove "symbolize" when transition to
+ # "symbolizer" is complete.
"//third_party/fuchsia-sdk/sdk/tools/${test_host_cpu}/symbolize",
+
+ "//third_party/fuchsia-sdk/sdk/tools/${test_host_cpu}/symbolizer",
"//third_party/fuchsia-sdk/sdk/tools/${test_host_cpu}/zbi",
]
@@ -154,8 +159,8 @@ template("fuchsia_package_runner") {
"//third_party/qemu-${host_os}-${test_host_cpu}/",
]
- # Include AEMU for x64 emulator hosts.
- if (test_host_cpu == "x64") {
+ # Include AEMU for x64 emulator hosts and for arm64 hosts.
+ if (test_host_cpu == "x64" || test_host_cpu == "arm64") {
data += [ "${aemu_root}/" ]
}
}
diff --git a/chromium/build/config/fuchsia/gfx_tests.cmx b/chromium/build/config/fuchsia/gfx_tests.cmx
index 67adedffa25..c02975d821f 100644
--- a/chromium/build/config/fuchsia/gfx_tests.cmx
+++ b/chromium/build/config/fuchsia/gfx_tests.cmx
@@ -15,7 +15,6 @@
"fuchsia.device.NameProvider",
"fuchsia.fonts.Provider",
"fuchsia.intl.PropertyProvider",
- "fuchsia.logger.Log",
"fuchsia.logger.LogSink",
"fuchsia.memorypressure.Provider",
"fuchsia.process.Launcher",
diff --git a/chromium/build/config/fuchsia/package.gni b/chromium/build/config/fuchsia/package.gni
index f69be31491a..ff6ffd0a3d2 100644
--- a/chromium/build/config/fuchsia/package.gni
+++ b/chromium/build/config/fuchsia/package.gni
@@ -75,6 +75,7 @@ template("cr_fuchsia_package") {
forward_variables_from(invoker, [ "testonly" ])
deps = [ ":${_component_cmx_target}" ]
+ data_deps = _package_contents
manifest = _component_manifest
if (defined(invoker.component_name_override)) {
@@ -82,19 +83,22 @@ template("cr_fuchsia_package") {
} else {
manifest_output_name = "${_package_name}"
}
-
- data_deps = _package_contents
}
# Bundle manifests providing additional entrypoints into the package.
if (defined(invoker.additional_manifests)) {
foreach(filename, invoker.additional_manifests) {
- _additional_component_target = target_name + "_" + filename
+ _additional_component_target =
+ target_name + "_" + get_path_info(filename, "name")
_package_components += [ ":${_additional_component_target}" ]
fuchsia_component(_additional_component_target) {
forward_variables_from(invoker, [ "testonly" ])
data_deps = _package_contents
manifest = filename
+
+ # Depend upon the invoker's |deps|, in case they include a dependency
+ # responsible for generating this additional component's manifest file.
+ deps = _package_contents
}
}
}
diff --git a/chromium/build/config/ios/BUILD.gn b/chromium/build/config/ios/BUILD.gn
index 2a4aa916f64..c4cd317b485 100644
--- a/chromium/build/config/ios/BUILD.gn
+++ b/chromium/build/config/ios/BUILD.gn
@@ -196,6 +196,11 @@ config("ios_shared_library_flags") {
]
}
+config("disable_implicit_retain_self_warning") {
+ cflags_objc = [ "-Wno-implicit-retain-self" ]
+ cflags_objcc = cflags_objc
+}
+
config("xctest_config") {
framework_dirs = [ "$ios_sdk_platform_path/Developer/Library/Frameworks" ]
diff --git a/chromium/build/config/ios/ios_test_runner_wrapper.gni b/chromium/build/config/ios/ios_test_runner_wrapper.gni
index 8911071ff51..115db7ffdb3 100644
--- a/chromium/build/config/ios/ios_test_runner_wrapper.gni
+++ b/chromium/build/config/ios/ios_test_runner_wrapper.gni
@@ -61,6 +61,8 @@ template("ios_test_runner_wrapper") {
_rebased_mac_toolchain = rebase_path("//mac_toolchain", root_build_dir)
_rebased_xcode_path = rebase_path("//Xcode.app", root_build_dir)
+ _rebased_ios_runtime_cache_prefix =
+ rebase_path("//Runtime-ios-", root_build_dir)
# --out-dir argument is specified in gn_isolate_map.pyl because
# ${ISOLATED_OUTDIR} doesn't get resolved through this wrapper.
@@ -69,6 +71,8 @@ template("ios_test_runner_wrapper") {
"@WrappedPath(${_rebased_xcode_path})",
"--mac-toolchain-cmd",
"@WrappedPath(${_rebased_mac_toolchain})",
+ "--runtime-cache-prefix",
+ "@WrappedPath(${_rebased_ios_runtime_cache_prefix})",
]
# Default retries to 3
diff --git a/chromium/build/config/linux/gtk/BUILD.gn b/chromium/build/config/linux/gtk/BUILD.gn
index 724dbcfdcfc..ecf95dda763 100644
--- a/chromium/build/config/linux/gtk/BUILD.gn
+++ b/chromium/build/config/linux/gtk/BUILD.gn
@@ -7,7 +7,11 @@ import("//build/config/linux/pkg_config.gni")
assert(is_linux, "This file should only be referenced on Linux")
-assert(gtk_version == 3 || gtk_version == 4)
+declare_args() {
+ # The (major) version of GTK to build against. A different version may be
+ # loaded at runtime.
+ gtk_version = 3
+}
# GN doesn't check visibility for configs so we give this an obviously internal
# name to discourage random targets from accidentally depending on this and
@@ -22,18 +26,18 @@ pkg_config("gtk_internal_config") {
if (gtk_version == 3) {
packages += [ "gtk+-3.0" ]
} else {
+ assert(gtk_version == 4)
packages += [ "gtk4" ]
}
}
group("gtk") {
visibility = [
- # These are the only directories that should depend on GTK.
- "//ui/gtk:*",
- "//ui/gtk/wayland",
- "//ui/gtk/x",
+ # This is the only target that can depend on GTK. Do not add more targets
+ # to this list.
+ "//ui/gtk:gtk_stubs",
- # These are all for WebRTC.
+ # These are allow-listed for WebRTC builds.
"//examples:peerconnection_client",
"//remoting/host:common",
"//remoting/host:remoting_me2me_host_static",
@@ -53,6 +57,7 @@ pkg_config("gtkprint_internal_config") {
if (gtk_version == 3) {
packages = [ "gtk+-unix-print-3.0" ]
} else {
+ assert(gtk_version == 4)
packages = [ "gtk4-unix-print" ]
}
}
diff --git a/chromium/build/config/linux/gtk/gtk.gni b/chromium/build/config/linux/gtk/gtk.gni
index 6e7d7327137..1e45248e677 100644
--- a/chromium/build/config/linux/gtk/gtk.gni
+++ b/chromium/build/config/linux/gtk/gtk.gni
@@ -7,9 +7,4 @@ import("//build/config/ui.gni")
declare_args() {
# Whether or not we should use libgtk.
use_gtk = is_linux && !is_chromecast
-
- # The (major) version of GTK to build against.
- gtk_version = 3
}
-
-assert(gtk_version >= 3 && gtk_version <= 4)
diff --git a/chromium/build/config/linux/pangocairo/pangocairo.gni b/chromium/build/config/linux/pangocairo/pangocairo.gni
index ecfe663a4be..6bc75294cdf 100644
--- a/chromium/build/config/linux/pangocairo/pangocairo.gni
+++ b/chromium/build/config/linux/pangocairo/pangocairo.gni
@@ -6,8 +6,5 @@ import("//build/config/chromeos/ui_mode.gni")
import("//build/config/ui.gni")
declare_args() {
- use_pangocairo =
- # TODO(crbug.com/1052397): Remove !chromeos_is_browser_only once
- # lacros-chrome switches to target_os="chromeos"
- is_linux && !is_chromecast && !chromeos_is_browser_only
+ use_pangocairo = is_linux && !is_chromecast
}
diff --git a/chromium/build/config/mac/rules.gni b/chromium/build/config/mac/rules.gni
index 30f6e4f257a..fa9eebb192d 100644
--- a/chromium/build/config/mac/rules.gni
+++ b/chromium/build/config/mac/rules.gni
@@ -103,13 +103,18 @@ template("mac_info_plist") {
# (optional) string array, 'key=value' pairs for extra fields which are
# specified in a source Info.plist template.
#
-# This template provides two targets for the resulting framework bundle. The
+# This template provides three targets for the resulting framework bundle. The
# link-time behavior varies depending on which of the two targets below is
# added as a dependency:
# - $target_name only adds a build-time dependency. Targets that depend on
# it will not link against the framework.
# - $target_name+link adds a build-time and link-time dependency. Targets
# that depend on it will link against the framework.
+# - $target_name+link_nested adds a build-time and link-time dependency, but
+# only on the shared library and not the fully-assembled framework bundle.
+# This should only be used for other nested binary components of the
+# framework bundle (e.g. Helpers) that themselves depend on the main shared
+# library of the framework bundle.
#
# The build-time-only dependency is used for when a target needs to use the
# framework either only for resources, or because the target loads it at run-
@@ -170,7 +175,7 @@ template("mac_info_plist") {
# See "gn help shared_library" for more information on arguments supported
# by shared library target.
template("mac_framework_bundle") {
- assert(defined(invoker.deps),
+ assert(defined(invoker.deps) || defined(invoker.public_deps),
"Dependencies must be specified for $target_name")
assert(invoker.framework_version != "", "framework_version is required")
assert(defined(invoker.framework_contents), "framework_contents is required")
@@ -278,7 +283,10 @@ template("mac_framework_bundle") {
"output_name",
"visibility",
])
- visibility = [ ":$_shared_library_bundle_data" ]
+ visibility = [
+ ":$_shared_library_bundle_data",
+ ":${_framework_target}+link_nested",
+ ]
output_name = _output_name
output_prefix_override = true
output_extension = ""
@@ -357,6 +365,21 @@ template("mac_framework_bundle") {
}
public_configs += [ ":$_framework_public_config" ]
}
+
+ group(_target_name + "+link_nested") {
+ forward_variables_from(invoker,
+ [
+ "public_configs",
+ "testonly",
+ "visibility",
+ ])
+
+ # Depend only on the shared library. Nested code will be a dependency of
+ # the create_bundle target, which would be cyclic with depending on the
+ # framework itself. This is sufficient to link; for loading, a proper
+ # install_name should be set.
+ public_deps = [ ":$_link_shared_library_target" ]
+ }
}
set_defaults("mac_framework_bundle") {
diff --git a/chromium/build/config/rts.gni b/chromium/build/config/rts.gni
new file mode 100644
index 00000000000..677b3fa2fe4
--- /dev/null
+++ b/chromium/build/config/rts.gni
@@ -0,0 +1,5 @@
+declare_args() {
+ # For more info about RTS, please see
+ # //docs/testing/regression-test-selection.md
+ use_rts = false
+}
diff --git a/chromium/build/config/sanitizers/BUILD.gn b/chromium/build/config/sanitizers/BUILD.gn
index bc2717c899a..aaaad023474 100644
--- a/chromium/build/config/sanitizers/BUILD.gn
+++ b/chromium/build/config/sanitizers/BUILD.gn
@@ -440,7 +440,7 @@ config("ubsan_flags") {
if (is_ubsan) {
if (!defined(ubsan_blacklist_path)) {
ubsan_blacklist_path =
- rebase_path("//tools/ubsan/blacklist.txt", root_build_dir)
+ rebase_path("//tools/ubsan/ignorelist.txt", root_build_dir)
}
cflags += [
"-fsanitize=bool",
@@ -488,7 +488,7 @@ config("ubsan_security_flags") {
if (is_ubsan_security) {
if (!defined(ubsan_security_blacklist_path)) {
ubsan_security_blacklist_path =
- rebase_path("//tools/ubsan/security_blacklist.txt", root_build_dir)
+ rebase_path("//tools/ubsan/security_ignorelist.txt", root_build_dir)
}
cflags = [
"-fsanitize=function",
@@ -510,7 +510,7 @@ config("ubsan_vptr_flags") {
if (is_ubsan_vptr) {
if (!defined(ubsan_vptr_blacklist_path)) {
ubsan_vptr_blacklist_path =
- rebase_path("//tools/ubsan/vptr_blacklist.txt", root_build_dir)
+ rebase_path("//tools/ubsan/vptr_ignorelist.txt", root_build_dir)
}
cflags = [
"-fsanitize=vptr",
diff --git a/chromium/build/config/win/BUILD.gn b/chromium/build/config/win/BUILD.gn
index 4870f67d48d..813c72c0561 100644
--- a/chromium/build/config/win/BUILD.gn
+++ b/chromium/build/config/win/BUILD.gn
@@ -375,13 +375,7 @@ config("cfi_linker") {
# for now. https://crbug.com/846966
if (!is_debug && !is_asan) {
# Turn on CFG bitmap generation and CFG load config.
- if (target_cpu == "arm64") {
- # longjmp protection is temporarily disabled on Windows on Arm64 due to
- # a code-generation defect. https://crbug.com/1126549
- ldflags = [ "/guard:cf,nolongjmp" ]
- } else {
- ldflags = [ "/guard:cf" ]
- }
+ ldflags = [ "/guard:cf" ]
}
}