Commit 49bdb0d5 authored by Takuto Ikuta's avatar Takuto Ikuta Committed by Commit Bot

Optimize build dependency for json_features template

With this CL, some compile task can run without waiting link of //extensions/common
There are many compile tasks depend on some json_features targets, and such compile tasks wait finish of link in //extensions/common in deps of json_features action.
But //extensions/common is not used in code generation, so we can move it to deps of source_set.
After moving to source_set, compile tasks in some targets depend on json_features no need to wait finish of link in //extensions/common, because gn knows object files only depend on source files.
gn can't find such unnecessary dependency if link is in deps of action.

ninja trace from building chrome without this CL.
http://chromium-build-stats.appspot.com/ninja_log/upload/ninja_log.ULVV1ZrTGHxHCPKRs4uVIbYdrYmR2QkE-yjpfNJwCeI=.gz/trace.html

ninja trace from building chrome with this CL.
http://chromium-build-stats.appspot.com/ninja_log/upload/ninja_log.KRBZxtDbA2CEAq1J8eBrfI_iy6pi8GL0XPj54IiiLM0=.gz/trace.html

Improved build time few seconds on Z840 linux.

Bug: 725639
Change-Id: I80739045663d08236266b0697c40758e53773c59
Reviewed-on: https://chromium-review.googlesource.com/668343
Commit-Queue: Takuto Ikuta <tikuta@google.com>
Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502765}
parent 6495ddd8
...@@ -53,13 +53,6 @@ template("json_features") { ...@@ -53,13 +53,6 @@ template("json_features") {
"deps", "deps",
"public_deps", "public_deps",
]) ])
# Append a dependency on the extensions system. Headers in this target
# are included by the feature compiler automatically.
if (!defined(deps)) {
deps = []
}
deps += [ "//extensions/common" ]
} }
source_set(target_name) { source_set(target_name) {
...@@ -74,5 +67,12 @@ template("json_features") { ...@@ -74,5 +67,12 @@ template("json_features") {
public_deps = [] public_deps = []
} }
public_deps += [ ":$action_name" ] public_deps += [ ":$action_name" ]
# Append a dependency on the extensions system. Headers in this target
# are included by the feature compiler automatically.
if (!defined(deps)) {
deps = []
}
deps += [ "//extensions/common" ]
} }
} }
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