Chromium Code Reviews| Index: build/toolchain/mac/BUILD.gn |
| diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn |
| index 1fdc1eef3175805485521607d667a19981de86e3..eb3dc1881ac49bf879ce01f16c970da11e329236 100644 |
| --- a/build/toolchain/mac/BUILD.gn |
| +++ b/build/toolchain/mac/BUILD.gn |
| @@ -23,6 +23,28 @@ if (use_goma) { |
| goma_prefix = "" |
| } |
| +declare_args() { |
| + # Control the number of copy_bundle_data and compile_xcassets tasks to run |
| + # simultaneously. As the tasks are doing lots of I/O, some limit is required |
| + # to prevent I/O starvation when ninja is run with a large number of parallel |
| + # jobs (e.g. when using distributed build like goma). |
| + bundle_pool_depth = -1 |
| +} |
| + |
| +if (current_toolchain == default_toolchain) { |
| + # Reduce the number of tasks using the copy_bundle_data and compile_xcassets |
| + # tools as they can cause lots of I/O contention when invoking ninja with a |
| + # large number of parallel jobs (e.g. when using distributed build like goma). |
| + pool("bundle_pool") { |
| + if (bundle_pool_depth == -1) { |
|
Dirk Pranke
2016/06/07 22:17:46
Can we just use the value of concurrent_links here
sdefresne
2016/06/08 08:04:27
Done.
|
| + depth = |
| + exec_script("//build/toolchain/get_concurrent_links.py", [], "value") |
| + } else { |
| + depth = bundle_pool_depth |
| + } |
| + } |
| +} |
| + |
| # This will copy the gyp-mac-tool to the build directory. We pass in the source |
| # file of the mac tool. |
| gyp_mac_tool_source = |
| @@ -271,6 +293,7 @@ template("mac_toolchain") { |
| root_build_dir) |
| command = "python $_tool {{source}} {{output}}" |
| description = "COPY_BUNDLE_DATA {{source}} {{output}}" |
| + pool = ":bundle_pool($default_toolchain)" |
| } |
| tool("compile_xcassets") { |
| _tool = rebase_path("//build/toolchain/mac/compile_xcassets.py", |
| @@ -287,6 +310,7 @@ template("mac_toolchain") { |
| "-o {{output}} {{inputs}}" |
| description = "COMPILE_XCASSETS {{output}}" |
| + pool = ":bundle_pool($default_toolchain)" |
| } |
| toolchain_args() { |