Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Unified Diff: components/domain_reliability/BUILD.gn

Issue 1430043002: Support script response files in GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comment, random build fix Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/domain_reliability.gypi ('k') | components/domain_reliability/bake_in_configs.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/domain_reliability/BUILD.gn
diff --git a/components/domain_reliability/BUILD.gn b/components/domain_reliability/BUILD.gn
index add26b47d25a7172ae08bf371dafcef85a015ca0..7b937e2ee650cb5b586e0e50172cd445faef094b 100644
--- a/components/domain_reliability/BUILD.gn
+++ b/components/domain_reliability/BUILD.gn
@@ -14,24 +14,53 @@ baked_in_configs_gypi = exec_script("//build/gypi_to_gn.py",
[ rebase_path("baked_in_configs.gypi") ],
"scope",
[ "baked_in_configs.gypi" ])
+
+# The config file names in the .gypi are relative to "//components".
baked_in_configs =
- rebase_path(baked_in_configs_gypi.baked_in_configs, "domain_reliability")
+ rebase_path(baked_in_configs_gypi.baked_in_configs, ".", "//components")
-action("bake_in_configs") {
- visibility = [ ":*" ]
- script = "bake_in_configs.py"
+# TODO(brettw) enable once GN supports response_file_contents for actions.
+if (false) {
+ action("bake_in_configs") {
+ visibility = [ ":*" ]
+ script = "bake_in_configs.py"
- inputs = baked_in_configs
- outputs = [
- "$target_gen_dir/baked_in_configs.cc",
- ]
+ inputs = baked_in_configs
+ output_file = "$target_gen_dir/baked_in_configs.cc"
+ outputs = [
+ output_file,
+ ]
+
+ # The JSON file list is too long for the command line on Windows, so put
+ # them in a response file.
+ response_file_contents = rebase_path(inputs, root_build_dir)
+ args = [
+ "--file-list",
+ "{{response_file_name}}",
+ "--output",
+ rebase_path(output_file, root_build_dir),
+ ]
+ }
+} else {
+ action("bake_in_configs") {
+ visibility = [ ":*" ]
+ script = "bake_in_configs.py"
+
+ inputs = baked_in_configs
+ output_file = "$target_gen_dir/baked_in_configs.cc"
+ outputs = [
+ output_file,
+ ]
- # The actual list of JSON files will overflow the command line length limit
- # on Windows, so pass the name of the .gypi file and bake_in_configs.py will
- # read the filenames out of it manually.
- args = [ rebase_path("//components", root_build_dir) ] +
- [ rebase_path("baked_in_configs.gypi", root_build_dir) ] +
- rebase_path(outputs, root_build_dir)
+ # The actual list of JSON files will overflow the command line length limit
+ # on Windows, so pass the name of the .gypi file and bake_in_configs.py will
+ # read the filenames out of it manually.
+ args = [
+ "--gypi-file=" + rebase_path("baked_in_configs.gypi", root_build_dir),
+ "--gypi-relative-to=" + rebase_path("//components", root_build_dir),
+ "--output=" + rebase_path(output_file, root_build_dir),
+ ]
+ }
}
component("domain_reliability") {
« no previous file with comments | « components/domain_reliability.gypi ('k') | components/domain_reliability/bake_in_configs.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698