OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # Generate IDL bindings for core, plus aggregate bindings files. | 5 # Generate IDL bindings for core, plus aggregate bindings files. |
6 # | 6 # |
7 # Design doc: http://www.chromium.org/developers/design-documents/idl-build | 7 # Design doc: http://www.chromium.org/developers/design-documents/idl-build |
8 | 8 |
9 { | 9 { |
10 'includes': [ | 10 'includes': [ |
11 '../../../core/core.gypi', | 11 '../../../core/core.gypi', |
12 '../../bindings.gypi', | 12 '../../bindings.gypi', |
13 # FIXME: need list of modules IDL files because some core IDL files depend | 13 # FIXME: need list of modules IDL files because some core IDL files depend |
14 # on modules IDL files http://crbug.com/358074 | 14 # on modules IDL files http://crbug.com/358074 |
15 '../../modules/idl.gypi', | 15 '../../modules/idl.gypi', |
| 16 # FIXME: need info about modules IDL files because some core IDL files |
| 17 # depend on modules IDL files http://crbug.com/358074 |
| 18 '../../modules/modules.gypi', |
16 '../../scripts/scripts.gypi', | 19 '../../scripts/scripts.gypi', |
17 '../idl.gypi', | 20 '../idl.gypi', |
18 'generated.gypi', | 21 'generated.gypi', |
19 ], | 22 ], |
20 | 23 |
21 # Write lists of main IDL files to a file, so that the command lines don't | 24 # Write lists of main IDL files to a file, so that the command lines don't |
22 # exceed OS length limits. | 25 # exceed OS length limits. |
23 'variables': { | 26 'variables': { |
24 'core_idl_files_list': '<|(core_idl_files_list.tmp <@(core_idl_files))', | 27 'core_idl_files_list': '<|(core_idl_files_list.tmp <@(core_idl_files))', |
25 }, | 28 }, |
(...skipping 17 matching lines...) Expand all Loading... |
43 'sources': [ | 46 'sources': [ |
44 '<@(core_interface_idl_files)', | 47 '<@(core_interface_idl_files)', |
45 ], | 48 ], |
46 'rules': [{ | 49 'rules': [{ |
47 'rule_name': 'binding', | 50 'rule_name': 'binding', |
48 'extension': 'idl', | 51 'extension': 'idl', |
49 'msvs_external_rule': 1, | 52 'msvs_external_rule': 1, |
50 'inputs': [ | 53 'inputs': [ |
51 '<@(idl_lexer_parser_files)', # to be explicit (covered by parsetab) | 54 '<@(idl_lexer_parser_files)', # to be explicit (covered by parsetab) |
52 '<@(idl_compiler_files)', | 55 '<@(idl_compiler_files)', |
53 '<(bindings_output_dir)/lextab.py', | 56 '<(bindings_scripts_output_dir)/lextab.py', |
54 '<(bindings_output_dir)/parsetab.pickle', | 57 '<(bindings_scripts_output_dir)/parsetab.pickle', |
55 '<(bindings_output_dir)/cached_jinja_templates.stamp', | 58 '<(bindings_scripts_output_dir)/cached_jinja_templates.stamp', |
56 '<(bindings_dir)/IDLExtendedAttributes.txt', | 59 '<(bindings_dir)/IDLExtendedAttributes.txt', |
57 # If the dependency structure or public interface info (e.g., | 60 # If the dependency structure or public interface info (e.g., |
58 # [ImplementedAs]) changes, we rebuild all files, since we're not | 61 # [ImplementedAs]) changes, we rebuild all files, since we're not |
59 # computing dependencies file-by-file in the build. | 62 # computing dependencies file-by-file in the build. |
60 # This data is generally stable. | 63 # This data is generally stable. |
61 '<(blink_output_dir)/InterfacesInfo.pickle', | 64 '<(bindings_modules_output_dir)/InterfacesInfoModules.pickle', |
62 # Further, if any dependency (partial interface or implemented | 65 # Further, if any dependency (partial interface or implemented |
63 # interface) changes, rebuild everything, since every IDL potentially | 66 # interface) changes, rebuild everything, since every IDL potentially |
64 # depends on them, because we're not computing dependencies | 67 # depends on them, because we're not computing dependencies |
65 # file-by-file. | 68 # file-by-file. |
66 # FIXME: This is too conservative, and causes excess rebuilds: | 69 # FIXME: This is too conservative, and causes excess rebuilds: |
67 # compute this file-by-file. http://crbug.com/341748 | 70 # compute this file-by-file. http://crbug.com/341748 |
68 # FIXME: should be core_all_dependency_idl_files only, but some core IDL | 71 # FIXME: should be core_all_dependency_idl_files only, but some core IDL |
69 # files depend on modules IDL files http://crbug.com/358074 | 72 # files depend on modules IDL files http://crbug.com/358074 |
70 '<@(all_dependency_idl_files)', | 73 '<@(all_dependency_idl_files)', |
71 ], | 74 ], |
72 'outputs': [ | 75 'outputs': [ |
73 '<(bindings_output_dir)/V8<(RULE_INPUT_ROOT).cpp', | 76 '<(bindings_core_v8_output_dir)/V8<(RULE_INPUT_ROOT).cpp', |
74 '<(bindings_output_dir)/V8<(RULE_INPUT_ROOT).h', | 77 '<(bindings_core_v8_output_dir)/V8<(RULE_INPUT_ROOT).h', |
75 ], | 78 ], |
76 # sanitize-win-build-log.sed uses a regex which matches this command | 79 # sanitize-win-build-log.sed uses a regex which matches this command |
77 # line (Python script + .idl file being processed). | 80 # line (Python script + .idl file being processed). |
78 # Update that regex if command line changes (other than changing flags) | 81 # Update that regex if command line changes (other than changing flags) |
79 'action': [ | 82 'action': [ |
80 'python', | 83 'python', |
81 '-S', # skip 'import site' to speed up startup | 84 '-S', # skip 'import site' to speed up startup |
82 '<(bindings_scripts_dir)/idl_compiler.py', | 85 '<(bindings_scripts_dir)/idl_compiler.py', |
| 86 '--cache-dir', |
| 87 '<(bindings_scripts_output_dir)', |
83 '--output-dir', | 88 '--output-dir', |
84 '<(bindings_output_dir)', | 89 '<(bindings_core_v8_output_dir)', |
85 '--interfaces-info', | 90 '--interfaces-info', |
86 '<(blink_output_dir)/InterfacesInfo.pickle', | 91 '<(bindings_modules_output_dir)/InterfacesInfoModules.pickle', |
87 '--write-file-only-if-changed', | 92 '--write-file-only-if-changed', |
88 '<(write_file_only_if_changed)', | 93 '<(write_file_only_if_changed)', |
89 '<(RULE_INPUT_PATH)', | 94 '<(RULE_INPUT_PATH)', |
90 ], | 95 ], |
91 'message': 'Generating binding from <(RULE_INPUT_PATH)', | 96 'message': 'Generating binding from <(RULE_INPUT_PATH)', |
92 }], | 97 }], |
93 }, | 98 }, |
94 ################################################################################ | 99 ################################################################################ |
95 { | 100 { |
96 'target_name': 'bindings_core_generated_aggregate', | 101 'target_name': 'bindings_core_generated_aggregate', |
97 'type': 'none', | 102 'type': 'none', |
98 'actions': [{ | 103 'actions': [{ |
99 'action_name': 'generate_aggregate_bindings_core', | 104 'action_name': 'generate_aggregate_bindings_core', |
100 'inputs': [ | 105 'inputs': [ |
101 '<(bindings_scripts_dir)/aggregate_generated_bindings.py', | 106 '<(bindings_scripts_dir)/aggregate_generated_bindings.py', |
102 '<(core_idl_files_list)', | 107 '<(core_idl_files_list)', |
103 ], | 108 ], |
104 'outputs': [ | 109 'outputs': [ |
105 '<@(bindings_core_generated_aggregate_files)', | 110 '<@(bindings_core_generated_aggregate_files)', |
106 ], | 111 ], |
107 'action': [ | 112 'action': [ |
108 'python', | 113 'python', |
109 '<(bindings_scripts_dir)/aggregate_generated_bindings.py', | 114 '<(bindings_scripts_dir)/aggregate_generated_bindings.py', |
| 115 'core', |
110 '<(core_idl_files_list)', | 116 '<(core_idl_files_list)', |
111 '--', | 117 '--', |
112 '<@(bindings_core_generated_aggregate_files)', | 118 '<@(bindings_core_generated_aggregate_files)', |
113 ], | 119 ], |
114 'message': 'Generating aggregate generated core bindings files', | 120 'message': 'Generating aggregate generated core bindings files', |
115 }], | 121 }], |
116 }, | 122 }, |
117 ################################################################################ | 123 ################################################################################ |
118 { | 124 { |
119 'target_name': 'bindings_core_generated', | 125 'target_name': 'bindings_core_generated', |
120 'type': 'none', | 126 'type': 'none', |
121 'dependencies': [ | 127 'dependencies': [ |
122 'bindings_core_generated_aggregate', | 128 'bindings_core_generated_aggregate', |
123 'bindings_core_generated_individual', | 129 'bindings_core_generated_individual', |
124 ], | 130 ], |
125 }, | 131 }, |
126 ################################################################################ | 132 ################################################################################ |
127 ], # targets | 133 ], # targets |
128 } | 134 } |
OLD | NEW |