summaryrefslogtreecommitdiffstats
path: root/gin/gin.gyp
blob: 1b5a544b018a110dc9f83257beb4d7e7ee53f198 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# Copyright 2013 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.

{
  'variables': {
    'chromium_code': 1,
    'gin_gen_path': '<(SHARED_INTERMEDIATE_DIR)/gin/',
  },
  'targets': [
    {
      'target_name': 'gin',
      'type': '<(component)',
      'dependencies': [
        '../base/base.gyp:base',
        '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
        '../v8/tools/gyp/v8.gyp:v8',
      ],
      'export_dependent_settings': [
        '../base/base.gyp:base',
        '../v8/tools/gyp/v8.gyp:v8',
      ],
      'defines': [
        'GIN_IMPLEMENTATION',
      ],
      'sources': [
        'arguments.cc',
        'arguments.h',
        'array_buffer.cc',
        'array_buffer.h',
        'context_holder.cc',
        'converter.cc',
        'converter.h',
        'debug_impl.cc',
        'debug_impl.h',
        'dictionary.cc',
        'dictionary.h',
        'function_template.cc',
        'function_template.h',
        'gin_export.h',
        'handle.h',
        'interceptor.cc',
        'interceptor.h',
        'isolate_holder.cc',
        'modules/console.cc',
        'modules/console.h',
        'modules/file_module_provider.cc',
        'modules/file_module_provider.h',
        'modules/module_registry.cc',
        'modules/module_registry.h',
        'modules/module_registry_observer.h',
        'modules/module_runner_delegate.cc',
        'modules/module_runner_delegate.h',
        'modules/timer.cc',
        'modules/timer.h',
        'object_template_builder.cc',
        'object_template_builder.h',
        'per_context_data.cc',
        'per_context_data.h',
        'per_isolate_data.cc',
        'per_isolate_data.h',
        'public/context_holder.h',
        'public/debug.h',
        'public/gin_embedders.h',
        'public/isolate_holder.h',
        'public/v8_platform.h',
        'public/wrapper_info.h',
        'runner.cc',
        'runner.h',
        'run_microtasks_observer.cc',
        'run_microtasks_observer.h',
        'shell_runner.cc',
        'shell_runner.h',
        'try_catch.cc',
        'try_catch.h',
        'v8_initializer.h',
        'v8_initializer.cc',
        'v8_isolate_memory_dump_provider.cc',
        'v8_isolate_memory_dump_provider.h',
        'v8_platform.cc',
        'wrappable.cc',
        'wrappable.h',
        'wrapper_info.cc',
      ],
      'conditions': [
        ['v8_use_external_startup_data==1 and OS=="win"', {
          'dependencies': [
            'gin_v8_snapshot_fingerprint',
            '../crypto/crypto.gyp:crypto',
          ],
          'sources': [
            '<(gin_gen_path)/v8_snapshot_fingerprint.cc',
          ],
          'defines': [
            'V8_VERIFY_EXTERNAL_STARTUP_DATA',
          ]
        }],
      ],
    },
    {
      'target_name': 'gin_v8_snapshot_fingerprint',
      'type': 'none',
      'variables': {
        'snapshot_file': '<(PRODUCT_DIR)/snapshot_blob.bin',
        'natives_file': '<(PRODUCT_DIR)/natives_blob.bin',
        'output_file': '<(gin_gen_path)/v8_snapshot_fingerprint.cc',
      },
      'includes': [ '../gin/fingerprint/fingerprint_v8_snapshot.gypi' ],
    },
    {
      'target_name': 'gin_shell',
      'type': 'executable',
      'dependencies': [
        '../base/base.gyp:base',
        '../base/base.gyp:base_i18n',
        '../v8/tools/gyp/v8.gyp:v8',
        'gin',
      ],
      'sources': [
        'shell/gin_main.cc',
      ],
      'msvs_settings': {
        'VCLinkerTool': {
          'SubSystem': '1', # /SUBSYSTEM:CONSOLE
        },
      },
    },
    {
      'target_name': 'gin_test',
      'type': 'static_library',
      'dependencies': [
        '../testing/gtest.gyp:gtest',
        '../v8/tools/gyp/v8.gyp:v8',
        'gin',
      ],
      'export_dependent_settings': [
        '../testing/gtest.gyp:gtest',
        'gin',
      ],
      'sources': [
        'test/file.cc',
        'test/file.h',
        'test/file_runner.cc',
        'test/file_runner.h',
        'test/gc.cc',
        'test/gc.h',
        'test/gtest.cc',
        'test/gtest.h',
        'test/v8_test.cc',
        'test/v8_test.h',
      ],
    },
    {
      'target_name': 'gin_unittests',
      'type': 'executable',
      'dependencies': [
        '../base/base.gyp:test_support_base',
        '../v8/tools/gyp/v8.gyp:v8',
        'gin_shell',
        'gin_test',
      ],
      'sources': [
        'converter_unittest.cc',
        'interceptor_unittest.cc',
        'modules/module_registry_unittest.cc',
        'modules/timer_unittest.cc',
        'per_context_data_unittest.cc',
        'shell_runner_unittest.cc',
        'shell/gin_shell_unittest.cc',
        'test/run_all_unittests.cc',
        'test/run_js_tests.cc',
        'v8_isolate_memory_dump_provider_unittest.cc',
        'wrappable_unittest.cc',
      ],
    },
  ],
  'conditions': [
    ['test_isolation_mode != "noop"', {
      'targets': [
        {
          'target_name': 'gin_unittests_run',
          'type': 'none',
          'dependencies': [
            'gin_unittests',
          ],
          'includes': [
            '../build/isolate.gypi',
          ],
          'sources': [
            'gin_unittests.isolate',
          ],
        },
      ],
    }],
  ],
}