Commit 85b48eb3 authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

Make it easier to surgically exclude targets from jumbo

Currently disabling jumbo for a build target in a local build means
that you also disable jumbo for all other targets with the same local
name, and giving a fully qualified label as name won't work at
all. This patch changes the matching to be more flexible so that you
can supply both a local name (as before) but also a full path or
qualified name like //third_party/blink/renderer/core/svg:svg

Bug: 825240
Change-Id: I706e4d7c3f863a7996e576d36ddd62ac81b8cb12
Reviewed-on: https://chromium-review.googlesource.com/c/1323110
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: default avatarWojciech Dzierżanowski <wdzierzanowski@opera.com>
Cr-Commit-Position: refs/heads/master@{#606433}
parent a86712ac
......@@ -10,8 +10,19 @@ declare_args() {
# compilation.
use_jumbo_build = false
# A list of targets to exclude from jumbo builds, for optimal round trip time
# when frequently changing a set of cpp files.
# A list of build targets to exclude from jumbo builds, for optimal
# round trip time when frequently changing a set of cpp files. The
# targets can be just the short name (in which case it matches any
# target with that name), a directory prefixed with the root
# specifier //, or a full build target label.
#
# Example:
# These would all exclude the "browser" target in a file
# content/browser/BUILD.gn, and potentially more.
#
# jumbo_build_excluded = [ "browser" ]
# jumbo_build_excluded = [ "//content/browser" ]
# jumbo_build_excluded = [ "//content/browser:browser" ]
jumbo_build_excluded = []
# How many files to group on average. Smaller numbers give more
......@@ -67,8 +78,12 @@ template("internal_jumbo_target") {
if (defined(invoker.never_build_jumbo) && invoker.never_build_jumbo) {
use_jumbo_build_for_target = false
}
foreach(excluded_target, jumbo_build_excluded) {
if (target_name == excluded_target) {
if (excluded_target == target_name ||
excluded_target == get_label_info(":" + target_name, "dir") ||
excluded_target ==
get_label_info(":" + target_name, "label_no_toolchain")) {
use_jumbo_build_for_target = false
}
}
......
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