Index: third_party/closure_compiler/compile_js.gni |
diff --git a/third_party/closure_compiler/compile_js.gni b/third_party/closure_compiler/compile_js.gni |
index 958ac1bc9b7c897d2d3af141bd79b371203cb2f2..36ea9a0ad4e68e09ff614baf5b1e60f5bbfcb192 100644 |
--- a/third_party/closure_compiler/compile_js.gni |
+++ b/third_party/closure_compiler/compile_js.gni |
@@ -17,6 +17,10 @@ compiler_path = "$script_path/compiler/compiler.jar" |
# deps: |
Sami
2017/05/24 09:16:22
I think renaming this to js_deps instead would mak
alex clarke (OOO till 29th)
2017/05/24 11:38:19
+dbeam@ WDYT?
|
# List of js_library targets to depend on |
# |
+# extra_deps: |
+# List of any other rules to depend on. E.g. a rule that generates js source |
+# files |
+# |
# Example: |
# js_library("apple_tree") { |
# sources = ["tree_main.js"] |
@@ -36,6 +40,7 @@ template("js_library") { |
[ |
"sources", |
"deps", |
+ "extra_deps", |
]) |
output_file = "$target_gen_dir/$target_name.js_library" |
outputs = [ |
@@ -55,6 +60,12 @@ template("js_library") { |
args += [ rebase_path(dep_output_path, root_build_dir) ] |
} |
} |
+ if (defined(extra_deps)) { |
+ if (!defined(deps)) { |
+ deps = [] |
+ } |
+ deps += extra_deps |
+ } |
} |
} |
@@ -69,6 +80,10 @@ template("js_library") { |
# deps: |
# List of js_library rules to depend on |
# |
+# extra_deps: |
+# List of any other rules to depend on. E.g. a rule that generates js source |
+# files |
+# |
# outputs: |
# A file to write the compiled .js to. |
# Only takes in a single file, but must be placed in a list |
@@ -117,6 +132,7 @@ template("js_binary") { |
"config_files", |
"closure_flags", |
"externs_list", |
+ "extra_deps", |
]) |
args = [ |
"--compiler", |
@@ -138,6 +154,12 @@ template("js_binary") { |
args += [ rebase_path(dep_output_path, root_build_dir) ] |
} |
} |
+ if (defined(extra_deps)) { |
+ if (!defined(deps)) { |
+ deps = [] |
+ } |
+ deps += extra_deps |
+ } |
if (defined(bootstrap_file)) { |
args += [ |
"--bootstrap", |