Index: Source/bindings/scripts/BUILD.gn |
diff --git a/Source/bindings/scripts/BUILD.gn b/Source/bindings/scripts/BUILD.gn |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ba5d3e1c63b5f4df036a470e3a8bcc2e69a75c48 |
--- /dev/null |
+++ b/Source/bindings/scripts/BUILD.gn |
@@ -0,0 +1,46 @@ |
+# Copyright 2014 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+import("//third_party/WebKit/Source/bindings/bindings.gni") |
+import("//third_party/WebKit/Source/bindings/scripts/scripts.gni") |
+import("//third_party/WebKit/Source/bindings/templates/templates.gni") |
+ |
+# A separate pre-caching step is *not required* to use lex/parse table |
+# caching in PLY, as the caches are concurrency-safe. |
+# However, pre-caching ensures that all compiler processes use the cached |
+# files (hence maximizing speed), instead of early processes building the |
+# tables themselves (as they've not yet been written when they start). |
+# |
+# GYP version: scripts.gyp:cached_lex_yacc_tables |
+action("cached_lex_yacc_tables") { |
+ script = "blink_idl_parser.py" |
+ |
+ source_prereqs = idl_lexer_parser_files |
+ outputs = [ |
+ "$bindings_scripts_output_dir/lextab.py", |
+ "$bindings_scripts_output_dir/parsetab.pickle", |
+ ] |
+ |
+ args = [ rebase_path(bindings_output_dir, root_build_dir) ] |
+} |
+ |
+# A separate pre-caching step is *required* to use bytecode caching in |
+# Jinja (which improves speed significantly), as the bytecode cache is |
+# not concurrency-safe on write; details in code_generator_v8.py. |
+# |
+# GYP version: scripts.gyp:cached_jinja_templates |
+action("cached_jinja_templates") { |
+ script = "code_generator_v8.py" |
+ |
+ source_prereqs = jinja_module_files + [ "code_generator_v8.py" ] + |
+ code_generator_template_files |
+ # Dummy file to track dependency. |
+ stamp_file = "$bindings_scripts_output_dir/cached_jinja_templates.stamp" |
+ outputs = [ stamp_file ] |
+ |
+ args = [ |
+ rebase_path(bindings_scripts_output_dir, root_build_dir), |
+ rebase_path(stamp_file, root_build_dir), |
+ ] |
+} |