Commit 2de47007 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Android: Reduce link pool when R8 or Android Lint is enabled.

Attempt to fix bots running out of memory.

Bug: 1104913
Change-Id: If2c66c41aad285dd8fe526714a43e2917d046e29
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2293252
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarPeter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#787880}
parent 66c12a3c
......@@ -7,6 +7,7 @@
# in the context of the default_toolchain, so we can at least check for that.
assert(current_toolchain == default_toolchain)
import("//build/config/android/config.gni")
import("//build/config/compiler/compiler.gni")
import("//build/config/mac/symbols.gni")
import("//build/config/sanitizers/sanitizers.gni")
......@@ -47,10 +48,14 @@ if (concurrent_links == -1) {
} else if (is_android && !is_component_build && symbol_level == 2) {
# Full debug symbols require large memory for link.
_args = [ "--mem_per_link_gb=25" ]
} else if (is_android && !is_debug && !using_sanitizer && symbol_level < 2) {
# Increase the number of concurrent links for release bots. Debug builds
# make heavier use of ProGuard, and so should not be raised. Sanitizers also
# increase the memory overhead.
} else if (is_android && !is_debug && !using_sanitizer && is_java_debug &&
disable_android_lint && symbol_level < 2) {
# The link pool is also shared with:
# * ProGuard / R8
# * Android Lint
# Increase the number of concurrent links for release bots that have
# ProGuard and Lint disabled, and that do not enable sanitizers (which use a
# lot of RAM).
if (symbol_level == 1) {
_args = [ "--mem_per_link_gb=6" ]
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment