Commit 6ade5dc4 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Rename source_is_generated -> enable_input_discovery_for_gn_analyze

And update docs for the setting.

TBR=agrieve  # Mechanical rename

Bug: 1054892
Change-Id: I7303eb44046f70fae7e6c6a11c7aacc913ef8654
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2107413
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751101}
parent d3375fab
...@@ -5561,7 +5561,7 @@ grit("resources") { ...@@ -5561,7 +5561,7 @@ grit("resources") {
source = "browser_resources.grd" source = "browser_resources.grd"
# Required due to flattenhtml="true" on a generated file. # Required due to flattenhtml="true" on a generated file.
source_is_generated = true enable_input_discovery_for_gn_analyze = false
use_brotli = true use_brotli = true
......
...@@ -276,7 +276,7 @@ if (is_chromeos) { ...@@ -276,7 +276,7 @@ if (is_chromeos) {
deps = [ "//chrome/browser/ui/webui/app_management:mojo_bindings_js" ] deps = [ "//chrome/browser/ui/webui/app_management:mojo_bindings_js" ]
if (optimize_webui) { if (optimize_webui) {
# Required due to flattenhtml="true" on a generated file. # Required due to flattenhtml="true" on a generated file.
source_is_generated = true enable_input_discovery_for_gn_analyze = false
source = "settings/os_settings_resources_vulcanized.grd" source = "settings/os_settings_resources_vulcanized.grd"
deps += [ "//chrome/browser/resources/settings/chromeos:build" ] deps += [ "//chrome/browser/resources/settings/chromeos:build" ]
......
...@@ -14,7 +14,9 @@ group("resources") { ...@@ -14,7 +14,9 @@ group("resources") {
grit("devtools_resources") { grit("devtools_resources") {
source = "$root_gen_dir/devtools/devtools_resources.grd" source = "$root_gen_dir/devtools/devtools_resources.grd"
source_is_generated = true
# Required because the .grd is generated.
enable_input_discovery_for_gn_analyze = false
use_brotli = true use_brotli = true
outputs = [ outputs = [
......
...@@ -32,7 +32,9 @@ action("generate_tracing_grd") { ...@@ -32,7 +32,9 @@ action("generate_tracing_grd") {
grit("resources") { grit("resources") {
source = tracing_grd source = tracing_grd
source_is_generated = true
# Required because the .grd is generated.
enable_input_discovery_for_gn_analyze = false
outputs = [ outputs = [
"grit/tracing_resources.h", "grit/tracing_resources.h",
......
...@@ -661,7 +661,7 @@ grit("resources") { ...@@ -661,7 +661,7 @@ grit("resources") {
source = "ios_web_resources.grd" source = "ios_web_resources.grd"
# Required due to flattenhtml="true" on a generated file. # Required due to flattenhtml="true" on a generated file.
source_is_generated = true enable_input_discovery_for_gn_analyze = false
outputs = [ outputs = [
"grit/ios_web_resources.h", "grit/ios_web_resources.h",
......
...@@ -14,13 +14,13 @@ ...@@ -14,13 +14,13 @@
# source (required) # source (required)
# Path to .grd file. # Path to .grd file.
# #
# source_is_generated (optional, defaults to false) # enable_input_discovery_for_gn_analyze (default=true)
# Declares that the input (or one of its dependencies) is generated so # Runs grit_info.py via exec_script() when compute_inputs_for_analyze=true
# that grit_info is not run on the file when # in order to discover all files that affect this target.
# compute_inputs_for_analyze is set (because the file will not # Turn this off when the .grd file is generated, or an <include> with
# exist at analyze time). For "analyze" to be correct in this case, the # flattenhtml=true points to a generated file.
# inputs to the grit file must either be listed in the inputs variable # For "gn analyze" to be correct with this arg disabled, all inputs
# or are listed as inputs to dependencies of this target. # must be listed via |inputs|.
# #
# inputs (optional) # inputs (optional)
# List of additional files, required for grit to process source file. # List of additional files, required for grit to process source file.
...@@ -292,9 +292,10 @@ template("grit") { ...@@ -292,9 +292,10 @@ template("grit") {
} }
_rebased_source_path = rebase_path(invoker.source, root_build_dir) _rebased_source_path = rebase_path(invoker.source, root_build_dir)
_source_is_generated = _enable_grit_info =
defined(invoker.source_is_generated) && invoker.source_is_generated !defined(invoker.enable_input_discovery_for_gn_analyze) ||
if (!_source_is_generated && compute_inputs_for_analyze) { invoker.enable_input_discovery_for_gn_analyze
if (_enable_grit_info && compute_inputs_for_analyze) {
# Only call exec_script when the user has explicitly opted into greater # Only call exec_script when the user has explicitly opted into greater
# precision at the expense of performance. # precision at the expense of performance.
_rel_inputs = exec_script("//tools/grit/grit_info.py", _rel_inputs = exec_script("//tools/grit/grit_info.py",
......
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