Home | History | Annotate | Download | only in scripts
      1 # Copyright 2014 The Chromium Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 import("//third_party/WebKit/Source/bindings/bindings.gni")
      6 import("//third_party/WebKit/Source/bindings/scripts/scripts.gni")
      7 import("//third_party/WebKit/Source/bindings/templates/templates.gni")
      8 
      9 visibility = "//third_party/WebKit/*"
     10 
     11 # A separate pre-caching step is *not required* to use lex/parse table
     12 # caching in PLY, as the caches are concurrency-safe.
     13 # However, pre-caching ensures that all compiler processes use the cached
     14 # files (hence maximizing speed), instead of early processes building the
     15 # tables themselves (as they've not yet been written when they start).
     16 #
     17 # GYP version: scripts.gyp:cached_lex_yacc_tables
     18 action("cached_lex_yacc_tables") {
     19   script = "blink_idl_parser.py"
     20 
     21   source_prereqs = idl_lexer_parser_files
     22   outputs = [
     23     "$bindings_scripts_output_dir/lextab.py",
     24     "$bindings_scripts_output_dir/parsetab.pickle",
     25   ]
     26 
     27   args = [ rebase_path(bindings_output_dir, root_build_dir) ]
     28 }
     29 
     30 # A separate pre-caching step is *required* to use bytecode caching in
     31 # Jinja (which improves speed significantly), as the bytecode cache is
     32 # not concurrency-safe on write; details in code_generator_v8.py.
     33 #
     34 # GYP version: scripts.gyp:cached_jinja_templates
     35 action("cached_jinja_templates") {
     36   script = "code_generator_v8.py"
     37 
     38   source_prereqs = jinja_module_files + [ "code_generator_v8.py" ] +
     39     code_generator_template_files
     40   # Dummy file to track dependency.
     41   stamp_file = "$bindings_scripts_output_dir/cached_jinja_templates.stamp"
     42   outputs = [ stamp_file ]
     43 
     44   args = [
     45     rebase_path(bindings_scripts_output_dir, root_build_dir),
     46     rebase_path(stamp_file, root_build_dir),
     47   ]
     48 }
     49