Jumbo for blink/core generated files as well (saving 8 CPU minutes)

The target that compiles generated files does not use the same
template as other code in blink core so it didn't automatically become
jumbo enabled. Since it's a non-negliable part of the build time (~1%)
this patch enables jumbo for this target as well.

R=fs@opera.com
BUG=713137

Review-Url: https://codereview.chromium.org/2973603003
Cr-Original-Commit-Position: refs/heads/master@{#485267}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 31abd9178c297b8c98cb43bf4037ff6b07ab0f83
This commit is contained in:
bratell 2017-07-10 07:40:18 -07:00 коммит произвёл Commit Bot
Родитель 89f39ee351
Коммит fd574d91e3
1 изменённых файлов: 19 добавлений и 0 удалений

Просмотреть файл

@ -66,6 +66,25 @@ template("jumbo_target") {
invoker_sources = invoker.sources
gen_target_dir = get_path_info(invoker_sources[0], "gen_dir")
assert(excluded_sources != [] || true) # Prevent "unused variable".
# Find the gen_target_dir directory with shortest path. Short paths
# are nice in themselves since they mean shorter error messages and
# fewer bytes to parse, but the currently deployed version of ninja
# also has a limitation where it only allows 32 path components in
# Windows.
# See https://crbug.com/738186 and
# https://github.com/ninja-build/ninja/issues/1161
foreach(source_file, invoker.sources) {
possibly_better_gen_target_dir = get_path_info(gen_target_dir, "dir")
possibly_better_gen_target_dir_2 =
get_path_info(possibly_better_gen_target_dir, "dir")
alt_gen_target_dir = get_path_info(source_file, "gen_dir")
if (alt_gen_target_dir == possibly_better_gen_target_dir ||
alt_gen_target_dir == possibly_better_gen_target_dir_2) {
gen_target_dir = alt_gen_target_dir
}
}
assert(gen_target_dir != "") # Prevent "unused variable".
if (use_jumbo_build_for_target) {