clang: Compiler tweaks to make android build for x64
[chromium-blink-merge.git] / third_party / mojo / mojom_bindings_generator.gypi
blobc9743ff359f6ed71dc7083548497f7fe4ec15204
1 # Copyright 2013 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.
6   'includes': [
7     'mojom_bindings_generator_variables.gypi',
8   ],
9   'actions': [
10     {
11       'variables': {
12         'java_out_dir': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src',
13         'stamp_filename': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/<(_target_name).stamp',
14       },
15       'action_name': '<(_target_name)_mojom_bindings_stamp',
16       # The java output directory is deleted to ensure that the java library
17       # doesn't try to compile stale files.
18       'action': [
19         'python', '<(DEPTH)/build/rmdir_and_stamp.py',
20         '<(java_out_dir)',
21         '<(stamp_filename)',
22       ],
23       'inputs': [ '<@(_sources)' ],
24       'outputs': [ '<(stamp_filename)' ],
25     }
26   ],
27   'rules': [
28     {
29       'rule_name': '<(_target_name)_mojom_bindings_generator',
30       'extension': 'mojom',
31       'variables': {
32         'mojom_base_output_dir':
33             '<!(python <(DEPTH)/build/inverse_depth.py <(DEPTH))',
34         'java_out_dir': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src',
35         'mojom_import_args%': [
36          '-I<(DEPTH)',
37          '-I<(DEPTH)/third_party/mojo/src'
38         ],
39         'stamp_filename': '<(PRODUCT_DIR)/java_mojo/<(_target_name)/<(_target_name).stamp',
40       },
41       'inputs': [
42         '<@(mojom_bindings_generator_sources)',
43         '<(stamp_filename)',
44       ],
45       'outputs': [
46         '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).mojom.cc',
47         '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).mojom.h',
48         '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).mojom.js',
49         '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)_mojom.py',
50         '<(SHARED_INTERMEDIATE_DIR)/<(mojom_base_output_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).mojom-internal.h',
51       ],
52       'action': [
53         'python', '<@(mojom_bindings_generator)',
54         './<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).mojom',
55         '--use_bundled_pylibs',
56         '-d', '<(DEPTH)',
57         '<@(mojom_import_args)',
58         '-o', '<(SHARED_INTERMEDIATE_DIR)',
59         '--java_output_directory=<(java_out_dir)',
60         '--dart_mojo_root=//third_party/mojo/src',
61       ],
62       'message': 'Generating Mojo bindings from <(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).mojom',
63       'process_outputs_as_sources': 1,
64     }
65   ],
66   'dependencies': [
67     '<(DEPTH)/third_party/mojo/mojo_public.gyp:mojo_interface_bindings_generation',
68   ],
69   'include_dirs': [
70     '<(DEPTH)',
71     '<(DEPTH)/third_party/mojo/src',
72     '<(SHARED_INTERMEDIATE_DIR)',
73     '<(SHARED_INTERMEDIATE_DIR)/third_party/mojo/src',
74   ],
75   'direct_dependent_settings': {
76     'include_dirs': [
77       '<(DEPTH)',
78       '<(DEPTH)/third_party/mojo/src',
79       '<(SHARED_INTERMEDIATE_DIR)',
80       '<(SHARED_INTERMEDIATE_DIR)/third_party/mojo/src',
81     ],
82     'variables': {
83       'generated_src_dirs': [
84         '<(PRODUCT_DIR)/java_mojo/<(_target_name)/src',
85       ],
86       'additional_input_paths': [
87         '<@(mojom_bindings_generator_sources)',
88         '<@(_sources)',
89       ],
90     },
91   },
92   'hard_dependency': 1,