diff --git a/DEPS b/DEPS index ec7493b48f13c..d576080cb359c 100644 --- a/DEPS +++ b/DEPS @@ -277,7 +277,7 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/flutter/buildroot.git' + '@' + '70a42312a688890eb1435a8c2760f6cbde324531', + 'src': 'https://github.com/flutter/buildroot.git' + '@' + '7840a4af027fc21161d4ae14a3d4d9c9bab049a2', 'src/flutter/third_party/depot_tools': Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '580b4ff3f5cd0dcaa2eacda28cefe0f45320e8f7', diff --git a/build/dart/BUILD.gn b/build/dart/BUILD.gn index 4c4d57d06965d..b9f9d0e88321b 100644 --- a/build/dart/BUILD.gn +++ b/build/dart/BUILD.gn @@ -7,17 +7,6 @@ import("//flutter/common/config.gni") import("$dart_src/build/dart/copy_tree.gni") -declare_args() { - # Maximum number of Dart processes to run in parallel. - # - # To avoid out-of-memory errors we explicitly reduce the number of jobs. - concurrent_dart_jobs = 1 -} - -pool("dart_pool") { - depth = concurrent_dart_jobs -} - if (build_engine_artifacts) { if (flutter_prebuilt_dart_sdk) { copy_trees("_copy_trees") { diff --git a/build/dart/rules.gni b/build/dart/rules.gni index c8242de63ab0a..6770a8411de8f 100644 --- a/build/dart/rules.gni +++ b/build/dart/rules.gni @@ -84,7 +84,7 @@ template("flutter_frontend_server") { ], [ "pool" ]) deps = common_deps - pool = "//flutter/build/dart:dart_pool" + pool = "//build/toolchain:toolchain_pool" script = "//build/gn_run_binary.py" inputs = [ invoker.main_dart ] outputs = [ invoker.kernel_output ] @@ -110,7 +110,7 @@ template("flutter_frontend_server") { ], [ "pool" ]) deps = common_deps - pool = "//flutter/build/dart:dart_pool" + pool = "//build/toolchain:toolchain_pool" script = "$dart_src/pkg/frontend_server/bin/frontend_server_starter.dart" inputs = [ invoker.main_dart ] outputs = [ invoker.kernel_output ] @@ -359,7 +359,7 @@ template("application_snapshot") { inputs = extra_inputs outputs = [ output ] depfile = depfile - pool = "//flutter/build/dart:dart_pool" + pool = "//build/toolchain:toolchain_pool" ext = "" if (is_win) { @@ -380,7 +380,7 @@ template("application_snapshot") { "visibility", ]) script = main_dart - pool = "//flutter/build/dart:dart_pool" + pool = "//build/toolchain:toolchain_pool" deps = extra_deps inputs = extra_inputs outputs = [ output ] diff --git a/docs/rbe/rbe.md b/docs/rbe/rbe.md index 8ad8161e21902..54ff23c6d2bc5 100644 --- a/docs/rbe/rbe.md +++ b/docs/rbe/rbe.md @@ -151,14 +151,23 @@ RBE builds can be slow for a few different reasons. The most common reason is likely to be that the remote caches are cold. When the caches are warm, a compile step consists only of downloading the compiled TU from the cache. When the caches are cold, the remote workers must run the compilation commands, -which takes more time. +which takes more time. If the worker pool is overloaded, compile commands may +run locally instead, which will also be slower. RBE builds can also be slow if your network connection is bandwidth constrained. Anecdotally, even with a warm cache, I have noticed slow builds from home due to RBE saturating my low-tier Comcast Business connection. +For Googlers on a corp macOS device, both RBE and non-RBE builds can be slow +due to various background and monitoring processes running. See +[here](https://buganizer.corp.google.com/issues/324404733#comment16) for how +to disable some of them. You should also disable Spotlight scanning of the +engine source directory as described +[here](go/building-chrome-mac#add-the-source-directory-to-the-spotlight-privacy-list). + When RBE builds are slow, non-RBE builds may be faster, especially incremental -builds. +builds. You can disable remote builds without invalidating your existing build +by setting the environment variable `RBE_exec_strategy=local`. ### Proxy status and debug logs diff --git a/impeller/tools/BUILD.gn b/impeller/tools/BUILD.gn deleted file mode 100644 index ae1bf978241ab..0000000000000 --- a/impeller/tools/BUILD.gn +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2013 The Flutter Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import("//build/compiled_action.gni") -import("//flutter/common/config.gni") -import("//flutter/impeller/tools/malioc.gni") -import("//flutter/testing/testing.gni") - -declare_args() { - # Maximum number of malioc processes to run in parallel. - # - # To avoid out-of-memory errors we explicitly reduce the number of jobs. - impeller_concurrent_malioc_jobs = 1 -} - -pool("malioc_pool") { - depth = impeller_concurrent_malioc_jobs -} diff --git a/impeller/tools/impeller.gni b/impeller/tools/impeller.gni index 55453fe574f32..e07fa42286797 100644 --- a/impeller/tools/impeller.gni +++ b/impeller/tools/impeller.gni @@ -339,6 +339,7 @@ template("impellerc") { ]) _impellerc(target_name) { + pool = "//build/toolchain:toolchain_pool" shader_bundle = defined(invoker.shader_bundle) # When single_invocation is true, impellerc will be invoked exactly once. When it's diff --git a/impeller/tools/malioc.gni b/impeller/tools/malioc.gni index bc9d7d4686d1b..356fcdcbaea1c 100644 --- a/impeller/tools/malioc.gni +++ b/impeller/tools/malioc.gni @@ -71,7 +71,7 @@ template("malioc_analyze_shaders") { ]) script = "//build/gn_run_malioc.py" - pool = "//flutter/impeller/tools:malioc_pool" + pool = "//build/toolchain:toolchain_pool" # Nest all malioc output under its own subdirectory of root_gen_dir # so that it's easier to diff it against the state before any changes. diff --git a/lib/snapshot/BUILD.gn b/lib/snapshot/BUILD.gn index 270dc680f60c7..99a431769ea31 100644 --- a/lib/snapshot/BUILD.gn +++ b/lib/snapshot/BUILD.gn @@ -232,7 +232,7 @@ compile_platform("strong_platform") { "$root_out_dir/flutter_patched_sdk/vm_outline_strong.dill", ] - pool = "//flutter/build/dart:dart_pool" + pool = "//build/toolchain:toolchain_pool" is_runtime_mode_release = flutter_runtime_mode == "release" || flutter_runtime_mode == "jit_release" diff --git a/testing/testing.gni b/testing/testing.gni index 66ac11cffd859..6d37b9e2f0757 100644 --- a/testing/testing.gni +++ b/testing/testing.gni @@ -108,7 +108,7 @@ template("dart_snapshot_aot") { tool = "$dart_src/runtime/bin:gen_snapshot" - pool = "//flutter/build/dart:dart_pool" + pool = "//build/toolchain:toolchain_pool" inputs = [ invoker.dart_kernel ] diff --git a/tools/gn b/tools/gn index d570a012f312a..99bb954651510 100755 --- a/tools/gn +++ b/tools/gn @@ -532,7 +532,7 @@ def to_gn_args(args): else: gn_args['dart_runtime_mode'] = runtime_mode - gn_args['concurrent_dart_jobs'] = get_concurrent_jobs('1GB', '1GB') + gn_args['concurrent_toolchain_jobs'] = get_concurrent_jobs('1GB', '100MB') # Hardcoding this avoids invoking a relatively expensive python script from # GN, but removes the ability to use git-worktrees in the Dart checkout from @@ -723,7 +723,6 @@ def to_gn_args(args): malioc_path = os.environ.get('MALIOC_PATH') if malioc_path: gn_args['impeller_malioc_path'] = malioc_path - gn_args['impeller_concurrent_malioc_jobs'] = get_concurrent_jobs('1GB', '100MB') if args.use_glfw_swiftshader: if get_host_os() == 'mac': diff --git a/web_sdk/BUILD.gn b/web_sdk/BUILD.gn index da541632d17c4..95e6bcd16bc78 100644 --- a/web_sdk/BUILD.gn +++ b/web_sdk/BUILD.gn @@ -119,7 +119,7 @@ template("_dartdevc") { inputs = invoker.inputs outputs = invoker.outputs - pool = "//flutter/build/dart:dart_pool" + pool = "//build/toolchain:toolchain_pool" ext = "" if (is_win) { @@ -146,7 +146,7 @@ template("_dartdevc") { script = "$dart_src/pkg/dev_compiler/bin/dartdevc.dart" - pool = "//flutter/build/dart:dart_pool" + pool = "//build/toolchain:toolchain_pool" } } } @@ -169,7 +169,7 @@ template("_kernel_worker") { inputs = invoker.inputs outputs = invoker.outputs - pool = "//flutter/build/dart:dart_pool" + pool = "//build/toolchain:toolchain_pool" ext = "" if (is_win) { @@ -197,7 +197,7 @@ template("_kernel_worker") { script = "$dart_src/utils/bazel/kernel_worker.dart" - pool = "//flutter/build/dart:dart_pool" + pool = "//build/toolchain:toolchain_pool" } } } diff --git a/web_sdk/web_sdk.gni b/web_sdk/web_sdk.gni index 2cbf17b07f2fb..b4d55fdc4fc09 100644 --- a/web_sdk/web_sdk.gni +++ b/web_sdk/web_sdk.gni @@ -20,7 +20,7 @@ template("sdk_rewriter") { prebuilt_dart_action(target_name) { packages = dart_sdk_package_config - pool = "//flutter/build/dart:dart_pool" + pool = "//build/toolchain:toolchain_pool" script = "//flutter/web_sdk/sdk_rewriter.dart"