Upstream version 10.39.233.0
[platform/framework/web/crosswalk.git] / src / v8 / tools / gyp / v8.gyp
1 # Copyright 2012 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are
4 # met:
5 #
6 #     * Redistributions of source code must retain the above copyright
7 #       notice, this list of conditions and the following disclaimer.
8 #     * Redistributions in binary form must reproduce the above
9 #       copyright notice, this list of conditions and the following
10 #       disclaimer in the documentation and/or other materials provided
11 #       with the distribution.
12 #     * Neither the name of Google Inc. nor the names of its
13 #       contributors may be used to endorse or promote products derived
14 #       from this software without specific prior written permission.
15 #
16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28 {
29   'variables': {
30     'icu_use_data_file_flag%': 0,
31     'v8_code': 1,
32     'v8_random_seed%': 314159265,
33   },
34   'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
35   'targets': [
36     {
37       'target_name': 'v8',
38       'dependencies_traverse': 1,
39       'conditions': [
40         ['want_separate_host_toolset==1', {
41           'toolsets': ['host', 'target'],
42         }, {
43           'toolsets': ['target'],
44         }],
45
46         ['v8_use_snapshot=="true" and v8_use_external_startup_data==0', {
47           # The dependency on v8_base should come from a transitive
48           # dependency however the Android toolchain requires libv8_base.a
49           # to appear before libv8_snapshot.a so it's listed explicitly.
50           'dependencies': ['v8_base', 'v8_snapshot'],
51         }],
52         ['v8_use_snapshot!="true" and v8_use_external_startup_data==0', {
53           # The dependency on v8_base should come from a transitive
54           # dependency however the Android toolchain requires libv8_base.a
55           # to appear before libv8_snapshot.a so it's listed explicitly.
56           'dependencies': ['v8_base', 'v8_nosnapshot'],
57         }],
58         ['v8_use_external_startup_data==1 and want_separate_host_toolset==1', {
59           'dependencies': ['v8_base', 'v8_external_snapshot'],
60           'target_conditions': [
61             ['_toolset=="host"', {
62               'inputs': [
63                 '<(PRODUCT_DIR)/snapshot_blob_host.bin',
64               ],
65             }, {
66               'inputs': [
67                 '<(PRODUCT_DIR)/snapshot_blob.bin',
68               ],
69             }],
70           ],
71         }],
72         ['v8_use_external_startup_data==1 and want_separate_host_toolset==0', {
73           'dependencies': ['v8_base', 'v8_external_snapshot'],
74           'inputs': [ '<(PRODUCT_DIR)/snapshot_blob.bin', ],
75         }],
76         ['component=="shared_library"', {
77           'type': '<(component)',
78           'sources': [
79             # Note: on non-Windows we still build this file so that gyp
80             # has some sources to link into the component.
81             '../../src/v8dll-main.cc',
82           ],
83           'include_dirs': [
84             '../..',
85           ],
86           'defines': [
87             'V8_SHARED',
88             'BUILDING_V8_SHARED',
89           ],
90           'direct_dependent_settings': {
91             'defines': [
92               'V8_SHARED',
93               'USING_V8_SHARED',
94             ],
95           },
96           'target_conditions': [
97             ['OS=="android" and _toolset=="target"', {
98               'libraries': [
99                 '-llog',
100               ],
101               'include_dirs': [
102                 'src/common/android/include',
103               ],
104             }],
105           ],
106           'conditions': [
107             ['OS=="mac"', {
108               'xcode_settings': {
109                 'OTHER_LDFLAGS': ['-dynamiclib', '-all_load']
110               },
111             }],
112             ['soname_version!=""', {
113               'product_extension': 'so.<(soname_version)',
114             }],
115           ],
116         },
117         {
118           'type': 'none',
119         }],
120       ],
121       'direct_dependent_settings': {
122         'include_dirs': [
123           '../../include',
124         ],
125       },
126     },
127     {
128       'target_name': 'v8_snapshot',
129       'type': 'static_library',
130       'conditions': [
131         ['want_separate_host_toolset==1', {
132           'toolsets': ['host', 'target'],
133           'dependencies': [
134             'mksnapshot#host',
135             'js2c#host',
136           ],
137         }, {
138           'toolsets': ['target'],
139           'dependencies': [
140             'mksnapshot',
141             'js2c',
142           ],
143         }],
144         ['component=="shared_library"', {
145           'defines': [
146             'V8_SHARED',
147             'BUILDING_V8_SHARED',
148           ],
149           'direct_dependent_settings': {
150             'defines': [
151               'V8_SHARED',
152               'USING_V8_SHARED',
153             ],
154           },
155         }],
156       ],
157       'dependencies': [
158         'v8_base',
159       ],
160       'include_dirs+': [
161         '../..',
162       ],
163       'sources': [
164         '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
165         '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
166         '<(INTERMEDIATE_DIR)/snapshot.cc',
167         '../../src/snapshot-common.cc',
168       ],
169       'actions': [
170         {
171           'action_name': 'run_mksnapshot',
172           'inputs': [
173             '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)',
174           ],
175           'outputs': [
176             '<(INTERMEDIATE_DIR)/snapshot.cc',
177           ],
178           'variables': {
179             'mksnapshot_flags': [
180               '--log-snapshot-positions',
181               '--logfile', '<(INTERMEDIATE_DIR)/snapshot.log',
182             ],
183             'conditions': [
184               ['v8_random_seed!=0', {
185                 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'],
186               }],
187             ],
188           },
189           'action': [
190             '<@(_inputs)',
191             '<@(mksnapshot_flags)',
192             '<@(INTERMEDIATE_DIR)/snapshot.cc'
193           ],
194         },
195       ],
196     },
197     {
198       'target_name': 'v8_nosnapshot',
199       'type': 'static_library',
200       'dependencies': [
201         'v8_base',
202       ],
203       'include_dirs+': [
204         '../..',
205       ],
206       'sources': [
207         '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
208         '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
209         '../../src/snapshot-common.cc',
210         '../../src/snapshot-empty.cc',
211       ],
212       'conditions': [
213         ['want_separate_host_toolset==1', {
214           'toolsets': ['host', 'target'],
215           'dependencies': ['js2c#host'],
216         }, {
217           'toolsets': ['target'],
218           'dependencies': ['js2c'],
219         }],
220         ['component=="shared_library"', {
221           'defines': [
222             'BUILDING_V8_SHARED',
223             'V8_SHARED',
224           ],
225         }],
226       ]
227     },
228     {
229       'target_name': 'v8_external_snapshot',
230       'type': 'static_library',
231       'conditions': [
232         ['want_separate_host_toolset==1', {
233           'toolsets': ['host', 'target'],
234           'dependencies': [
235             'mksnapshot#host',
236             'js2c#host',
237             'natives_blob',
238         ]}, {
239           'toolsets': ['target'],
240           'dependencies': [
241             'mksnapshot',
242             'js2c',
243             'natives_blob',
244           ],
245         }],
246         ['component=="shared_library"', {
247           'defines': [
248             'V8_SHARED',
249             'BUILDING_V8_SHARED',
250           ],
251           'direct_dependent_settings': {
252             'defines': [
253               'V8_SHARED',
254               'USING_V8_SHARED',
255             ],
256           },
257         }],
258       ],
259       'dependencies': [
260         'v8_base',
261       ],
262       'include_dirs+': [
263         '../..',
264       ],
265       'sources': [
266         '../../src/natives-external.cc',
267         '../../src/snapshot-external.cc',
268       ],
269       'actions': [
270         {
271           'action_name': 'run_mksnapshot (external)',
272           'inputs': [
273             '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)',
274           ],
275           'conditions': [
276             ['want_separate_host_toolset==1', {
277               'target_conditions': [
278                 ['_toolset=="host"', {
279                   'outputs': [
280                     '<(INTERMEDIATE_DIR)/snapshot.cc',
281                     '<(PRODUCT_DIR)/snapshot_blob_host.bin',
282                   ],
283                 }, {
284                   'outputs': [
285                     '<(INTERMEDIATE_DIR)/snapshot.cc',
286                     '<(PRODUCT_DIR)/snapshot_blob.bin',
287                   ],
288                 }],
289               ],
290             }, {
291               'outputs': [
292                 '<(INTERMEDIATE_DIR)/snapshot.cc',
293                 '<(PRODUCT_DIR)/snapshot_blob.bin',
294               ],
295             }],
296           ],
297           'variables': {
298             'mksnapshot_flags': [
299               '--log-snapshot-positions',
300               '--logfile', '<(INTERMEDIATE_DIR)/snapshot.log',
301             ],
302             'conditions': [
303               ['v8_random_seed!=0', {
304                 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'],
305               }],
306             ],
307           },
308           'action': [
309             '<@(_inputs)',
310             '<@(mksnapshot_flags)',
311             '<@(INTERMEDIATE_DIR)/snapshot.cc',
312             '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob.bin',
313           ],
314         },
315       ],
316     },
317     {
318       'target_name': 'v8_base',
319       'type': 'static_library',
320       'dependencies': [
321         'v8_libbase',
322       ],
323       'variables': {
324         'optimize': 'max',
325       },
326       'include_dirs+': [
327         '../..',
328       ],
329       'sources': [  ### gcmole(all) ###
330         '../../src/accessors.cc',
331         '../../src/accessors.h',
332         '../../src/allocation.cc',
333         '../../src/allocation.h',
334         '../../src/allocation-site-scopes.cc',
335         '../../src/allocation-site-scopes.h',
336         '../../src/allocation-tracker.cc',
337         '../../src/allocation-tracker.h',
338         '../../src/api.cc',
339         '../../src/api.h',
340         '../../src/arguments.cc',
341         '../../src/arguments.h',
342         '../../src/assembler.cc',
343         '../../src/assembler.h',
344         '../../src/assert-scope.h',
345         '../../src/assert-scope.cc',
346         '../../src/ast-value-factory.cc',
347         '../../src/ast-value-factory.h',
348         '../../src/ast.cc',
349         '../../src/ast.h',
350         '../../src/background-parsing-task.cc',
351         '../../src/background-parsing-task.h',
352         '../../src/bailout-reason.cc',
353         '../../src/bailout-reason.h',
354         '../../src/bignum-dtoa.cc',
355         '../../src/bignum-dtoa.h',
356         '../../src/bignum.cc',
357         '../../src/bignum.h',
358         '../../src/bootstrapper.cc',
359         '../../src/bootstrapper.h',
360         '../../src/builtins.cc',
361         '../../src/builtins.h',
362         '../../src/bytecodes-irregexp.h',
363         '../../src/cached-powers.cc',
364         '../../src/cached-powers.h',
365         '../../src/char-predicates-inl.h',
366         '../../src/char-predicates.h',
367         '../../src/checks.cc',
368         '../../src/checks.h',
369         '../../src/circular-queue-inl.h',
370         '../../src/circular-queue.h',
371         '../../src/code-factory.cc',
372         '../../src/code-factory.h',
373         '../../src/code-stubs.cc',
374         '../../src/code-stubs.h',
375         '../../src/code-stubs-hydrogen.cc',
376         '../../src/code.h',
377         '../../src/codegen.cc',
378         '../../src/codegen.h',
379         '../../src/compilation-cache.cc',
380         '../../src/compilation-cache.h',
381         '../../src/compiler/access-builder.cc',
382         '../../src/compiler/access-builder.h',
383         '../../src/compiler/ast-graph-builder.cc',
384         '../../src/compiler/ast-graph-builder.h',
385         '../../src/compiler/change-lowering.cc',
386         '../../src/compiler/change-lowering.h',
387         '../../src/compiler/code-generator-impl.h',
388         '../../src/compiler/code-generator.cc',
389         '../../src/compiler/code-generator.h',
390         '../../src/compiler/common-node-cache.h',
391         '../../src/compiler/common-operator.cc',
392         '../../src/compiler/common-operator.h',
393         '../../src/compiler/control-builders.cc',
394         '../../src/compiler/control-builders.h',
395         '../../src/compiler/frame.h',
396         '../../src/compiler/gap-resolver.cc',
397         '../../src/compiler/gap-resolver.h',
398         '../../src/compiler/generic-algorithm-inl.h',
399         '../../src/compiler/generic-algorithm.h',
400         '../../src/compiler/generic-graph.h',
401         '../../src/compiler/generic-node-inl.h',
402         '../../src/compiler/generic-node.h',
403         '../../src/compiler/graph-builder.cc',
404         '../../src/compiler/graph-builder.h',
405         '../../src/compiler/graph-inl.h',
406         '../../src/compiler/graph-reducer.cc',
407         '../../src/compiler/graph-reducer.h',
408         '../../src/compiler/graph-replay.cc',
409         '../../src/compiler/graph-replay.h',
410         '../../src/compiler/graph-visualizer.cc',
411         '../../src/compiler/graph-visualizer.h',
412         '../../src/compiler/graph.cc',
413         '../../src/compiler/graph.h',
414         '../../src/compiler/instruction-codes.h',
415         '../../src/compiler/instruction-selector-impl.h',
416         '../../src/compiler/instruction-selector.cc',
417         '../../src/compiler/instruction-selector.h',
418         '../../src/compiler/instruction.cc',
419         '../../src/compiler/instruction.h',
420         '../../src/compiler/js-builtin-reducer.cc',
421         '../../src/compiler/js-builtin-reducer.h',
422         '../../src/compiler/js-context-specialization.cc',
423         '../../src/compiler/js-context-specialization.h',
424         '../../src/compiler/js-generic-lowering.cc',
425         '../../src/compiler/js-generic-lowering.h',
426         '../../src/compiler/js-graph.cc',
427         '../../src/compiler/js-graph.h',
428         '../../src/compiler/js-inlining.cc',
429         '../../src/compiler/js-inlining.h',
430         '../../src/compiler/js-operator.h',
431         '../../src/compiler/js-typed-lowering.cc',
432         '../../src/compiler/js-typed-lowering.h',
433         '../../src/compiler/linkage-impl.h',
434         '../../src/compiler/linkage.cc',
435         '../../src/compiler/linkage.h',
436         '../../src/compiler/machine-operator-reducer.cc',
437         '../../src/compiler/machine-operator-reducer.h',
438         '../../src/compiler/machine-operator.cc',
439         '../../src/compiler/machine-operator.h',
440         '../../src/compiler/machine-type.cc',
441         '../../src/compiler/machine-type.h',
442         '../../src/compiler/node-aux-data-inl.h',
443         '../../src/compiler/node-aux-data.h',
444         '../../src/compiler/node-cache.cc',
445         '../../src/compiler/node-cache.h',
446         '../../src/compiler/node-matchers.h',
447         '../../src/compiler/node-properties-inl.h',
448         '../../src/compiler/node-properties.h',
449         '../../src/compiler/node.cc',
450         '../../src/compiler/node.h',
451         '../../src/compiler/opcodes.h',
452         '../../src/compiler/operator-properties-inl.h',
453         '../../src/compiler/operator-properties.h',
454         '../../src/compiler/operator.cc',
455         '../../src/compiler/operator.h',
456         '../../src/compiler/phi-reducer.h',
457         '../../src/compiler/pipeline.cc',
458         '../../src/compiler/pipeline.h',
459         '../../src/compiler/raw-machine-assembler.cc',
460         '../../src/compiler/raw-machine-assembler.h',
461         '../../src/compiler/register-allocator.cc',
462         '../../src/compiler/register-allocator.h',
463         '../../src/compiler/representation-change.h',
464         '../../src/compiler/schedule.cc',
465         '../../src/compiler/schedule.h',
466         '../../src/compiler/scheduler.cc',
467         '../../src/compiler/scheduler.h',
468         '../../src/compiler/simplified-lowering.cc',
469         '../../src/compiler/simplified-lowering.h',
470         '../../src/compiler/simplified-operator-reducer.cc',
471         '../../src/compiler/simplified-operator-reducer.h',
472         '../../src/compiler/simplified-operator.cc',
473         '../../src/compiler/simplified-operator.h',
474         '../../src/compiler/source-position.cc',
475         '../../src/compiler/source-position.h',
476         '../../src/compiler/typer.cc',
477         '../../src/compiler/typer.h',
478         '../../src/compiler/value-numbering-reducer.cc',
479         '../../src/compiler/value-numbering-reducer.h',
480         '../../src/compiler/verifier.cc',
481         '../../src/compiler/verifier.h',
482         '../../src/compiler.cc',
483         '../../src/compiler.h',
484         '../../src/contexts.cc',
485         '../../src/contexts.h',
486         '../../src/conversions-inl.h',
487         '../../src/conversions.cc',
488         '../../src/conversions.h',
489         '../../src/counters.cc',
490         '../../src/counters.h',
491         '../../src/cpu-profiler-inl.h',
492         '../../src/cpu-profiler.cc',
493         '../../src/cpu-profiler.h',
494         '../../src/data-flow.cc',
495         '../../src/data-flow.h',
496         '../../src/date.cc',
497         '../../src/date.h',
498         '../../src/dateparser-inl.h',
499         '../../src/dateparser.cc',
500         '../../src/dateparser.h',
501         '../../src/debug.cc',
502         '../../src/debug.h',
503         '../../src/deoptimizer.cc',
504         '../../src/deoptimizer.h',
505         '../../src/disasm.h',
506         '../../src/disassembler.cc',
507         '../../src/disassembler.h',
508         '../../src/diy-fp.cc',
509         '../../src/diy-fp.h',
510         '../../src/double.h',
511         '../../src/dtoa.cc',
512         '../../src/dtoa.h',
513         '../../src/effects.h',
514         '../../src/elements-kind.cc',
515         '../../src/elements-kind.h',
516         '../../src/elements.cc',
517         '../../src/elements.h',
518         '../../src/execution.cc',
519         '../../src/execution.h',
520         '../../src/extensions/externalize-string-extension.cc',
521         '../../src/extensions/externalize-string-extension.h',
522         '../../src/extensions/free-buffer-extension.cc',
523         '../../src/extensions/free-buffer-extension.h',
524         '../../src/extensions/gc-extension.cc',
525         '../../src/extensions/gc-extension.h',
526         '../../src/extensions/statistics-extension.cc',
527         '../../src/extensions/statistics-extension.h',
528         '../../src/extensions/trigger-failure-extension.cc',
529         '../../src/extensions/trigger-failure-extension.h',
530         '../../src/factory.cc',
531         '../../src/factory.h',
532         '../../src/fast-dtoa.cc',
533         '../../src/fast-dtoa.h',
534         '../../src/feedback-slots.h',
535         '../../src/field-index.h',
536         '../../src/field-index-inl.h',
537         '../../src/fixed-dtoa.cc',
538         '../../src/fixed-dtoa.h',
539         '../../src/flag-definitions.h',
540         '../../src/flags.cc',
541         '../../src/flags.h',
542         '../../src/frames-inl.h',
543         '../../src/frames.cc',
544         '../../src/frames.h',
545         '../../src/full-codegen.cc',
546         '../../src/full-codegen.h',
547         '../../src/func-name-inferrer.cc',
548         '../../src/func-name-inferrer.h',
549         '../../src/gdb-jit.cc',
550         '../../src/gdb-jit.h',
551         '../../src/global-handles.cc',
552         '../../src/global-handles.h',
553         '../../src/globals.h',
554         '../../src/handles-inl.h',
555         '../../src/handles.cc',
556         '../../src/handles.h',
557         '../../src/hashmap.h',
558         '../../src/heap-profiler.cc',
559         '../../src/heap-profiler.h',
560         '../../src/heap-snapshot-generator-inl.h',
561         '../../src/heap-snapshot-generator.cc',
562         '../../src/heap-snapshot-generator.h',
563         '../../src/heap/gc-idle-time-handler.cc',
564         '../../src/heap/gc-idle-time-handler.h',
565         '../../src/heap/gc-tracer.cc',
566         '../../src/heap/gc-tracer.h',
567         '../../src/heap/heap-inl.h',
568         '../../src/heap/heap.cc',
569         '../../src/heap/heap.h',
570         '../../src/heap/incremental-marking-inl.h',
571         '../../src/heap/incremental-marking.cc',
572         '../../src/heap/incremental-marking.h',
573         '../../src/heap/mark-compact-inl.h',
574         '../../src/heap/mark-compact.cc',
575         '../../src/heap/mark-compact.h',
576         '../../src/heap/objects-visiting-inl.h',
577         '../../src/heap/objects-visiting.cc',
578         '../../src/heap/objects-visiting.h',
579         '../../src/heap/spaces-inl.h',
580         '../../src/heap/spaces.cc',
581         '../../src/heap/spaces.h',
582         '../../src/heap/store-buffer-inl.h',
583         '../../src/heap/store-buffer.cc',
584         '../../src/heap/store-buffer.h',
585         '../../src/heap/sweeper-thread.h',
586         '../../src/heap/sweeper-thread.cc',
587         '../../src/hydrogen-alias-analysis.h',
588         '../../src/hydrogen-bce.cc',
589         '../../src/hydrogen-bce.h',
590         '../../src/hydrogen-bch.cc',
591         '../../src/hydrogen-bch.h',
592         '../../src/hydrogen-canonicalize.cc',
593         '../../src/hydrogen-canonicalize.h',
594         '../../src/hydrogen-check-elimination.cc',
595         '../../src/hydrogen-check-elimination.h',
596         '../../src/hydrogen-dce.cc',
597         '../../src/hydrogen-dce.h',
598         '../../src/hydrogen-dehoist.cc',
599         '../../src/hydrogen-dehoist.h',
600         '../../src/hydrogen-environment-liveness.cc',
601         '../../src/hydrogen-environment-liveness.h',
602         '../../src/hydrogen-escape-analysis.cc',
603         '../../src/hydrogen-escape-analysis.h',
604         '../../src/hydrogen-flow-engine.h',
605         '../../src/hydrogen-instructions.cc',
606         '../../src/hydrogen-instructions.h',
607         '../../src/hydrogen.cc',
608         '../../src/hydrogen.h',
609         '../../src/hydrogen-gvn.cc',
610         '../../src/hydrogen-gvn.h',
611         '../../src/hydrogen-infer-representation.cc',
612         '../../src/hydrogen-infer-representation.h',
613         '../../src/hydrogen-infer-types.cc',
614         '../../src/hydrogen-infer-types.h',
615         '../../src/hydrogen-load-elimination.cc',
616         '../../src/hydrogen-load-elimination.h',
617         '../../src/hydrogen-mark-deoptimize.cc',
618         '../../src/hydrogen-mark-deoptimize.h',
619         '../../src/hydrogen-mark-unreachable.cc',
620         '../../src/hydrogen-mark-unreachable.h',
621         '../../src/hydrogen-osr.cc',
622         '../../src/hydrogen-osr.h',
623         '../../src/hydrogen-range-analysis.cc',
624         '../../src/hydrogen-range-analysis.h',
625         '../../src/hydrogen-redundant-phi.cc',
626         '../../src/hydrogen-redundant-phi.h',
627         '../../src/hydrogen-removable-simulates.cc',
628         '../../src/hydrogen-removable-simulates.h',
629         '../../src/hydrogen-representation-changes.cc',
630         '../../src/hydrogen-representation-changes.h',
631         '../../src/hydrogen-sce.cc',
632         '../../src/hydrogen-sce.h',
633         '../../src/hydrogen-store-elimination.cc',
634         '../../src/hydrogen-store-elimination.h',
635         '../../src/hydrogen-types.cc',
636         '../../src/hydrogen-types.h',
637         '../../src/hydrogen-uint32-analysis.cc',
638         '../../src/hydrogen-uint32-analysis.h',
639         '../../src/i18n.cc',
640         '../../src/i18n.h',
641         '../../src/icu_util.cc',
642         '../../src/icu_util.h',
643         '../../src/ic/access-compiler.cc',
644         '../../src/ic/access-compiler.h',
645         '../../src/ic/call-optimization.cc',
646         '../../src/ic/call-optimization.h',
647         '../../src/ic/handler-compiler.cc',
648         '../../src/ic/handler-compiler.h',
649         '../../src/ic/ic-inl.h',
650         '../../src/ic/ic-state.cc',
651         '../../src/ic/ic-state.h',
652         '../../src/ic/ic.cc',
653         '../../src/ic/ic.h',
654         '../../src/ic/ic-compiler.cc',
655         '../../src/ic/ic-compiler.h',
656         '../../src/interface.cc',
657         '../../src/interface.h',
658         '../../src/interface-descriptors.cc',
659         '../../src/interface-descriptors.h',
660         '../../src/interpreter-irregexp.cc',
661         '../../src/interpreter-irregexp.h',
662         '../../src/isolate.cc',
663         '../../src/isolate.h',
664         '../../src/json-parser.h',
665         '../../src/json-stringifier.h',
666         '../../src/jsregexp-inl.h',
667         '../../src/jsregexp.cc',
668         '../../src/jsregexp.h',
669         '../../src/list-inl.h',
670         '../../src/list.h',
671         '../../src/lithium-allocator-inl.h',
672         '../../src/lithium-allocator.cc',
673         '../../src/lithium-allocator.h',
674         '../../src/lithium-codegen.cc',
675         '../../src/lithium-codegen.h',
676         '../../src/lithium.cc',
677         '../../src/lithium.h',
678         '../../src/lithium-inl.h',
679         '../../src/liveedit.cc',
680         '../../src/liveedit.h',
681         '../../src/log-inl.h',
682         '../../src/log-utils.cc',
683         '../../src/log-utils.h',
684         '../../src/log.cc',
685         '../../src/log.h',
686         '../../src/lookup-inl.h',
687         '../../src/lookup.cc',
688         '../../src/lookup.h',
689         '../../src/macro-assembler.h',
690         '../../src/messages.cc',
691         '../../src/messages.h',
692         '../../src/msan.h',
693         '../../src/natives.h',
694         '../../src/objects-debug.cc',
695         '../../src/objects-inl.h',
696         '../../src/objects-printer.cc',
697         '../../src/objects.cc',
698         '../../src/objects.h',
699         '../../src/optimizing-compiler-thread.cc',
700         '../../src/optimizing-compiler-thread.h',
701         '../../src/ostreams.cc',
702         '../../src/ostreams.h',
703         '../../src/parser.cc',
704         '../../src/parser.h',
705         '../../src/perf-jit.cc',
706         '../../src/perf-jit.h',
707         '../../src/preparse-data-format.h',
708         '../../src/preparse-data.cc',
709         '../../src/preparse-data.h',
710         '../../src/preparser.cc',
711         '../../src/preparser.h',
712         '../../src/prettyprinter.cc',
713         '../../src/prettyprinter.h',
714         '../../src/profile-generator-inl.h',
715         '../../src/profile-generator.cc',
716         '../../src/profile-generator.h',
717         '../../src/property-details.h',
718         '../../src/property.cc',
719         '../../src/property.h',
720         '../../src/prototype.h',
721         '../../src/regexp-macro-assembler-irregexp-inl.h',
722         '../../src/regexp-macro-assembler-irregexp.cc',
723         '../../src/regexp-macro-assembler-irregexp.h',
724         '../../src/regexp-macro-assembler-tracer.cc',
725         '../../src/regexp-macro-assembler-tracer.h',
726         '../../src/regexp-macro-assembler.cc',
727         '../../src/regexp-macro-assembler.h',
728         '../../src/regexp-stack.cc',
729         '../../src/regexp-stack.h',
730         '../../src/rewriter.cc',
731         '../../src/rewriter.h',
732         '../../src/runtime-profiler.cc',
733         '../../src/runtime-profiler.h',
734         '../../src/runtime.cc',
735         '../../src/runtime.h',
736         '../../src/safepoint-table.cc',
737         '../../src/safepoint-table.h',
738         '../../src/sampler.cc',
739         '../../src/sampler.h',
740         '../../src/scanner-character-streams.cc',
741         '../../src/scanner-character-streams.h',
742         '../../src/scanner.cc',
743         '../../src/scanner.h',
744         '../../src/scopeinfo.cc',
745         '../../src/scopeinfo.h',
746         '../../src/scopes.cc',
747         '../../src/scopes.h',
748         '../../src/serialize.cc',
749         '../../src/serialize.h',
750         '../../src/small-pointer-list.h',
751         '../../src/smart-pointers.h',
752         '../../src/snapshot.h',
753         '../../src/snapshot-source-sink.cc',
754         '../../src/snapshot-source-sink.h',
755         '../../src/string-search.cc',
756         '../../src/string-search.h',
757         '../../src/string-stream.cc',
758         '../../src/string-stream.h',
759         '../../src/strtod.cc',
760         '../../src/strtod.h',
761         '../../src/ic/stub-cache.cc',
762         '../../src/ic/stub-cache.h',
763         '../../src/token.cc',
764         '../../src/token.h',
765         '../../src/transitions-inl.h',
766         '../../src/transitions.cc',
767         '../../src/transitions.h',
768         '../../src/type-feedback-vector-inl.h',
769         '../../src/type-feedback-vector.cc',
770         '../../src/type-feedback-vector.h',
771         '../../src/type-info.cc',
772         '../../src/type-info.h',
773         '../../src/types-inl.h',
774         '../../src/types.cc',
775         '../../src/types.h',
776         '../../src/typing.cc',
777         '../../src/typing.h',
778         '../../src/unbound-queue-inl.h',
779         '../../src/unbound-queue.h',
780         '../../src/unicode-inl.h',
781         '../../src/unicode.cc',
782         '../../src/unicode.h',
783         '../../src/unique.h',
784         '../../src/uri.h',
785         '../../src/utils-inl.h',
786         '../../src/utils.cc',
787         '../../src/utils.h',
788         '../../src/v8.cc',
789         '../../src/v8.h',
790         '../../src/v8memory.h',
791         '../../src/v8threads.cc',
792         '../../src/v8threads.h',
793         '../../src/variables.cc',
794         '../../src/variables.h',
795         '../../src/vector.h',
796         '../../src/version.cc',
797         '../../src/version.h',
798         '../../src/vm-state-inl.h',
799         '../../src/vm-state.h',
800         '../../src/zone-inl.h',
801         '../../src/zone.cc',
802         '../../src/zone.h',
803         '../../third_party/fdlibm/fdlibm.cc',
804         '../../third_party/fdlibm/fdlibm.h',
805       ],
806       'conditions': [
807         ['want_separate_host_toolset==1', {
808           'toolsets': ['host', 'target'],
809         }, {
810           'toolsets': ['target'],
811         }],
812         ['v8_target_arch=="arm"', {
813           'sources': [  ### gcmole(arch:arm) ###
814             '../../src/arm/assembler-arm-inl.h',
815             '../../src/arm/assembler-arm.cc',
816             '../../src/arm/assembler-arm.h',
817             '../../src/arm/builtins-arm.cc',
818             '../../src/arm/code-stubs-arm.cc',
819             '../../src/arm/code-stubs-arm.h',
820             '../../src/arm/codegen-arm.cc',
821             '../../src/arm/codegen-arm.h',
822             '../../src/arm/constants-arm.h',
823             '../../src/arm/constants-arm.cc',
824             '../../src/arm/cpu-arm.cc',
825             '../../src/arm/debug-arm.cc',
826             '../../src/arm/deoptimizer-arm.cc',
827             '../../src/arm/disasm-arm.cc',
828             '../../src/arm/frames-arm.cc',
829             '../../src/arm/frames-arm.h',
830             '../../src/arm/full-codegen-arm.cc',
831             '../../src/arm/interface-descriptors-arm.cc',
832             '../../src/arm/interface-descriptors-arm.h',
833             '../../src/arm/lithium-arm.cc',
834             '../../src/arm/lithium-arm.h',
835             '../../src/arm/lithium-codegen-arm.cc',
836             '../../src/arm/lithium-codegen-arm.h',
837             '../../src/arm/lithium-gap-resolver-arm.cc',
838             '../../src/arm/lithium-gap-resolver-arm.h',
839             '../../src/arm/macro-assembler-arm.cc',
840             '../../src/arm/macro-assembler-arm.h',
841             '../../src/arm/regexp-macro-assembler-arm.cc',
842             '../../src/arm/regexp-macro-assembler-arm.h',
843             '../../src/arm/simulator-arm.cc',
844             '../../src/compiler/arm/code-generator-arm.cc',
845             '../../src/compiler/arm/instruction-codes-arm.h',
846             '../../src/compiler/arm/instruction-selector-arm.cc',
847             '../../src/compiler/arm/linkage-arm.cc',
848             '../../src/ic/arm/access-compiler-arm.cc',
849             '../../src/ic/arm/handler-compiler-arm.cc',
850             '../../src/ic/arm/ic-arm.cc',
851             '../../src/ic/arm/ic-compiler-arm.cc',
852             '../../src/ic/arm/stub-cache-arm.cc',
853           ],
854         }],
855         ['v8_target_arch=="arm64"', {
856           'sources': [  ### gcmole(arch:arm64) ###
857             '../../src/arm64/assembler-arm64.cc',
858             '../../src/arm64/assembler-arm64.h',
859             '../../src/arm64/assembler-arm64-inl.h',
860             '../../src/arm64/builtins-arm64.cc',
861             '../../src/arm64/codegen-arm64.cc',
862             '../../src/arm64/codegen-arm64.h',
863             '../../src/arm64/code-stubs-arm64.cc',
864             '../../src/arm64/code-stubs-arm64.h',
865             '../../src/arm64/constants-arm64.h',
866             '../../src/arm64/cpu-arm64.cc',
867             '../../src/arm64/debug-arm64.cc',
868             '../../src/arm64/decoder-arm64.cc',
869             '../../src/arm64/decoder-arm64.h',
870             '../../src/arm64/decoder-arm64-inl.h',
871             '../../src/arm64/delayed-masm-arm64.cc',
872             '../../src/arm64/delayed-masm-arm64.h',
873             '../../src/arm64/delayed-masm-arm64-inl.h',
874             '../../src/arm64/deoptimizer-arm64.cc',
875             '../../src/arm64/disasm-arm64.cc',
876             '../../src/arm64/disasm-arm64.h',
877             '../../src/arm64/frames-arm64.cc',
878             '../../src/arm64/frames-arm64.h',
879             '../../src/arm64/full-codegen-arm64.cc',
880             '../../src/arm64/instructions-arm64.cc',
881             '../../src/arm64/instructions-arm64.h',
882             '../../src/arm64/instrument-arm64.cc',
883             '../../src/arm64/instrument-arm64.h',
884             '../../src/arm64/interface-descriptors-arm64.cc',
885             '../../src/arm64/interface-descriptors-arm64.h',
886             '../../src/arm64/lithium-arm64.cc',
887             '../../src/arm64/lithium-arm64.h',
888             '../../src/arm64/lithium-codegen-arm64.cc',
889             '../../src/arm64/lithium-codegen-arm64.h',
890             '../../src/arm64/lithium-gap-resolver-arm64.cc',
891             '../../src/arm64/lithium-gap-resolver-arm64.h',
892             '../../src/arm64/macro-assembler-arm64.cc',
893             '../../src/arm64/macro-assembler-arm64.h',
894             '../../src/arm64/macro-assembler-arm64-inl.h',
895             '../../src/arm64/regexp-macro-assembler-arm64.cc',
896             '../../src/arm64/regexp-macro-assembler-arm64.h',
897             '../../src/arm64/simulator-arm64.cc',
898             '../../src/arm64/simulator-arm64.h',
899             '../../src/arm64/utils-arm64.cc',
900             '../../src/arm64/utils-arm64.h',
901             '../../src/compiler/arm64/code-generator-arm64.cc',
902             '../../src/compiler/arm64/instruction-codes-arm64.h',
903             '../../src/compiler/arm64/instruction-selector-arm64.cc',
904             '../../src/compiler/arm64/linkage-arm64.cc',
905             '../../src/ic/arm64/access-compiler-arm64.cc',
906             '../../src/ic/arm64/handler-compiler-arm64.cc',
907             '../../src/ic/arm64/ic-arm64.cc',
908             '../../src/ic/arm64/ic-compiler-arm64.cc',
909             '../../src/ic/arm64/stub-cache-arm64.cc',
910           ],
911         }],
912         ['v8_target_arch=="ia32"', {
913           'sources': [  ### gcmole(arch:ia32) ###
914             '../../src/ia32/assembler-ia32-inl.h',
915             '../../src/ia32/assembler-ia32.cc',
916             '../../src/ia32/assembler-ia32.h',
917             '../../src/ia32/builtins-ia32.cc',
918             '../../src/ia32/code-stubs-ia32.cc',
919             '../../src/ia32/code-stubs-ia32.h',
920             '../../src/ia32/codegen-ia32.cc',
921             '../../src/ia32/codegen-ia32.h',
922             '../../src/ia32/cpu-ia32.cc',
923             '../../src/ia32/debug-ia32.cc',
924             '../../src/ia32/deoptimizer-ia32.cc',
925             '../../src/ia32/disasm-ia32.cc',
926             '../../src/ia32/frames-ia32.cc',
927             '../../src/ia32/frames-ia32.h',
928             '../../src/ia32/full-codegen-ia32.cc',
929             '../../src/ia32/interface-descriptors-ia32.cc',
930             '../../src/ia32/lithium-codegen-ia32.cc',
931             '../../src/ia32/lithium-codegen-ia32.h',
932             '../../src/ia32/lithium-gap-resolver-ia32.cc',
933             '../../src/ia32/lithium-gap-resolver-ia32.h',
934             '../../src/ia32/lithium-ia32.cc',
935             '../../src/ia32/lithium-ia32.h',
936             '../../src/ia32/macro-assembler-ia32.cc',
937             '../../src/ia32/macro-assembler-ia32.h',
938             '../../src/ia32/regexp-macro-assembler-ia32.cc',
939             '../../src/ia32/regexp-macro-assembler-ia32.h',
940             '../../src/compiler/ia32/code-generator-ia32.cc',
941             '../../src/compiler/ia32/instruction-codes-ia32.h',
942             '../../src/compiler/ia32/instruction-selector-ia32.cc',
943             '../../src/compiler/ia32/linkage-ia32.cc',
944             '../../src/ic/ia32/access-compiler-ia32.cc',
945             '../../src/ic/ia32/handler-compiler-ia32.cc',
946             '../../src/ic/ia32/ic-ia32.cc',
947             '../../src/ic/ia32/ic-compiler-ia32.cc',
948             '../../src/ic/ia32/stub-cache-ia32.cc',
949           ],
950         }],
951         ['v8_target_arch=="x87"', {
952           'sources': [  ### gcmole(arch:x87) ###
953             '../../src/x87/assembler-x87-inl.h',
954             '../../src/x87/assembler-x87.cc',
955             '../../src/x87/assembler-x87.h',
956             '../../src/x87/builtins-x87.cc',
957             '../../src/x87/code-stubs-x87.cc',
958             '../../src/x87/code-stubs-x87.h',
959             '../../src/x87/codegen-x87.cc',
960             '../../src/x87/codegen-x87.h',
961             '../../src/x87/cpu-x87.cc',
962             '../../src/x87/debug-x87.cc',
963             '../../src/x87/deoptimizer-x87.cc',
964             '../../src/x87/disasm-x87.cc',
965             '../../src/x87/frames-x87.cc',
966             '../../src/x87/frames-x87.h',
967             '../../src/x87/full-codegen-x87.cc',
968             '../../src/x87/interface-descriptors-x87.cc',
969             '../../src/x87/lithium-codegen-x87.cc',
970             '../../src/x87/lithium-codegen-x87.h',
971             '../../src/x87/lithium-gap-resolver-x87.cc',
972             '../../src/x87/lithium-gap-resolver-x87.h',
973             '../../src/x87/lithium-x87.cc',
974             '../../src/x87/lithium-x87.h',
975             '../../src/x87/macro-assembler-x87.cc',
976             '../../src/x87/macro-assembler-x87.h',
977             '../../src/x87/regexp-macro-assembler-x87.cc',
978             '../../src/x87/regexp-macro-assembler-x87.h',
979             '../../src/ic/x87/access-compiler-x87.cc',
980             '../../src/ic/x87/handler-compiler-x87.cc',
981             '../../src/ic/x87/ic-x87.cc',
982             '../../src/ic/x87/ic-compiler-x87.cc',
983             '../../src/ic/x87/stub-cache-x87.cc',
984           ],
985         }],
986         ['v8_target_arch=="mips" or v8_target_arch=="mipsel"', {
987           'sources': [  ### gcmole(arch:mipsel) ###
988             '../../src/mips/assembler-mips.cc',
989             '../../src/mips/assembler-mips.h',
990             '../../src/mips/assembler-mips-inl.h',
991             '../../src/mips/builtins-mips.cc',
992             '../../src/mips/codegen-mips.cc',
993             '../../src/mips/codegen-mips.h',
994             '../../src/mips/code-stubs-mips.cc',
995             '../../src/mips/code-stubs-mips.h',
996             '../../src/mips/constants-mips.cc',
997             '../../src/mips/constants-mips.h',
998             '../../src/mips/cpu-mips.cc',
999             '../../src/mips/debug-mips.cc',
1000             '../../src/mips/deoptimizer-mips.cc',
1001             '../../src/mips/disasm-mips.cc',
1002             '../../src/mips/frames-mips.cc',
1003             '../../src/mips/frames-mips.h',
1004             '../../src/mips/full-codegen-mips.cc',
1005             '../../src/mips/interface-descriptors-mips.cc',
1006             '../../src/mips/lithium-codegen-mips.cc',
1007             '../../src/mips/lithium-codegen-mips.h',
1008             '../../src/mips/lithium-gap-resolver-mips.cc',
1009             '../../src/mips/lithium-gap-resolver-mips.h',
1010             '../../src/mips/lithium-mips.cc',
1011             '../../src/mips/lithium-mips.h',
1012             '../../src/mips/macro-assembler-mips.cc',
1013             '../../src/mips/macro-assembler-mips.h',
1014             '../../src/mips/regexp-macro-assembler-mips.cc',
1015             '../../src/mips/regexp-macro-assembler-mips.h',
1016             '../../src/mips/simulator-mips.cc',
1017             '../../src/ic/mips/access-compiler-mips.cc',
1018             '../../src/ic/mips/handler-compiler-mips.cc',
1019             '../../src/ic/mips/ic-mips.cc',
1020             '../../src/ic/mips/ic-compiler-mips.cc',
1021             '../../src/ic/mips/stub-cache-mips.cc',
1022           ],
1023         }],
1024         ['v8_target_arch=="mips64el"', {
1025           'sources': [  ### gcmole(arch:mips64el) ###
1026             '../../src/mips64/assembler-mips64.cc',
1027             '../../src/mips64/assembler-mips64.h',
1028             '../../src/mips64/assembler-mips64-inl.h',
1029             '../../src/mips64/builtins-mips64.cc',
1030             '../../src/mips64/codegen-mips64.cc',
1031             '../../src/mips64/codegen-mips64.h',
1032             '../../src/mips64/code-stubs-mips64.cc',
1033             '../../src/mips64/code-stubs-mips64.h',
1034             '../../src/mips64/constants-mips64.cc',
1035             '../../src/mips64/constants-mips64.h',
1036             '../../src/mips64/cpu-mips64.cc',
1037             '../../src/mips64/debug-mips64.cc',
1038             '../../src/mips64/deoptimizer-mips64.cc',
1039             '../../src/mips64/disasm-mips64.cc',
1040             '../../src/mips64/frames-mips64.cc',
1041             '../../src/mips64/frames-mips64.h',
1042             '../../src/mips64/full-codegen-mips64.cc',
1043             '../../src/mips64/interface-descriptors-mips64.cc',
1044             '../../src/mips64/lithium-codegen-mips64.cc',
1045             '../../src/mips64/lithium-codegen-mips64.h',
1046             '../../src/mips64/lithium-gap-resolver-mips64.cc',
1047             '../../src/mips64/lithium-gap-resolver-mips64.h',
1048             '../../src/mips64/lithium-mips64.cc',
1049             '../../src/mips64/lithium-mips64.h',
1050             '../../src/mips64/macro-assembler-mips64.cc',
1051             '../../src/mips64/macro-assembler-mips64.h',
1052             '../../src/mips64/regexp-macro-assembler-mips64.cc',
1053             '../../src/mips64/regexp-macro-assembler-mips64.h',
1054             '../../src/mips64/simulator-mips64.cc',
1055             '../../src/ic/mips64/access-compiler-mips64.cc',
1056             '../../src/ic/mips64/handler-compiler-mips64.cc',
1057             '../../src/ic/mips64/ic-mips64.cc',
1058             '../../src/ic/mips64/ic-compiler-mips64.cc',
1059             '../../src/ic/mips64/stub-cache-mips64.cc',
1060           ],
1061         }],
1062         ['v8_target_arch=="x64" or v8_target_arch=="x32"', {
1063           'sources': [  ### gcmole(arch:x64) ###
1064             '../../src/x64/assembler-x64-inl.h',
1065             '../../src/x64/assembler-x64.cc',
1066             '../../src/x64/assembler-x64.h',
1067             '../../src/x64/builtins-x64.cc',
1068             '../../src/x64/code-stubs-x64.cc',
1069             '../../src/x64/code-stubs-x64.h',
1070             '../../src/x64/codegen-x64.cc',
1071             '../../src/x64/codegen-x64.h',
1072             '../../src/x64/cpu-x64.cc',
1073             '../../src/x64/debug-x64.cc',
1074             '../../src/x64/deoptimizer-x64.cc',
1075             '../../src/x64/disasm-x64.cc',
1076             '../../src/x64/frames-x64.cc',
1077             '../../src/x64/frames-x64.h',
1078             '../../src/x64/full-codegen-x64.cc',
1079             '../../src/x64/interface-descriptors-x64.cc',
1080             '../../src/x64/lithium-codegen-x64.cc',
1081             '../../src/x64/lithium-codegen-x64.h',
1082             '../../src/x64/lithium-gap-resolver-x64.cc',
1083             '../../src/x64/lithium-gap-resolver-x64.h',
1084             '../../src/x64/lithium-x64.cc',
1085             '../../src/x64/lithium-x64.h',
1086             '../../src/x64/macro-assembler-x64.cc',
1087             '../../src/x64/macro-assembler-x64.h',
1088             '../../src/x64/regexp-macro-assembler-x64.cc',
1089             '../../src/x64/regexp-macro-assembler-x64.h',
1090             '../../src/compiler/x64/code-generator-x64.cc',
1091             '../../src/compiler/x64/instruction-codes-x64.h',
1092             '../../src/compiler/x64/instruction-selector-x64.cc',
1093             '../../src/compiler/x64/linkage-x64.cc',
1094             '../../src/ic/x64/access-compiler-x64.cc',
1095             '../../src/ic/x64/handler-compiler-x64.cc',
1096             '../../src/ic/x64/ic-x64.cc',
1097             '../../src/ic/x64/ic-compiler-x64.cc',
1098             '../../src/ic/x64/stub-cache-x64.cc',
1099           ],
1100         }],
1101         ['OS=="linux"', {
1102             'link_settings': {
1103               'conditions': [
1104                 ['v8_compress_startup_data=="bz2"', {
1105                   'libraries': [
1106                     '-lbz2',
1107                   ]
1108                 }],
1109               ],
1110             },
1111           }
1112         ],
1113         ['OS=="win"', {
1114           'variables': {
1115             'gyp_generators': '<!(echo $GYP_GENERATORS)',
1116           },
1117           'msvs_disabled_warnings': [4351, 4355, 4800],
1118         }],
1119         ['component=="shared_library"', {
1120           'defines': [
1121             'BUILDING_V8_SHARED',
1122             'V8_SHARED',
1123           ],
1124         }],
1125         ['v8_postmortem_support=="true"', {
1126           'sources': [
1127             '<(SHARED_INTERMEDIATE_DIR)/debug-support.cc',
1128           ]
1129         }],
1130         ['v8_enable_i18n_support==1', {
1131           'dependencies': [
1132             '<(icu_gyp_path):icui18n',
1133             '<(icu_gyp_path):icuuc',
1134           ]
1135         }, {  # v8_enable_i18n_support==0
1136           'sources!': [
1137             '../../src/i18n.cc',
1138             '../../src/i18n.h',
1139           ],
1140         }],
1141         ['OS=="win" and v8_enable_i18n_support==1', {
1142           'dependencies': [
1143             '<(icu_gyp_path):icudata',
1144           ],
1145         }],
1146         ['icu_use_data_file_flag==1', {
1147           'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE'],
1148         }, { # else icu_use_data_file_flag !=1
1149           'conditions': [
1150             ['OS=="win"', {
1151               'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_SHARED'],
1152             }, {
1153               'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC'],
1154             }],
1155           ],
1156         }],
1157       ],
1158     },
1159     {
1160       'target_name': 'v8_libbase',
1161       'type': 'static_library',
1162       'variables': {
1163         'optimize': 'max',
1164       },
1165       'include_dirs+': [
1166         '../..',
1167       ],
1168       'sources': [
1169         '../../src/base/atomicops.h',
1170         '../../src/base/atomicops_internals_arm64_gcc.h',
1171         '../../src/base/atomicops_internals_arm_gcc.h',
1172         '../../src/base/atomicops_internals_atomicword_compat.h',
1173         '../../src/base/atomicops_internals_mac.h',
1174         '../../src/base/atomicops_internals_mips_gcc.h',
1175         '../../src/base/atomicops_internals_tsan.h',
1176         '../../src/base/atomicops_internals_x86_gcc.cc',
1177         '../../src/base/atomicops_internals_x86_gcc.h',
1178         '../../src/base/atomicops_internals_x86_msvc.h',
1179         '../../src/base/bits.cc',
1180         '../../src/base/bits.h',
1181         '../../src/base/build_config.h',
1182         '../../src/base/compiler-specific.h',
1183         '../../src/base/cpu.cc',
1184         '../../src/base/cpu.h',
1185         '../../src/base/division-by-constant.cc',
1186         '../../src/base/division-by-constant.h',
1187         '../../src/base/flags.h',
1188         '../../src/base/lazy-instance.h',
1189         '../../src/base/logging.cc',
1190         '../../src/base/logging.h',
1191         '../../src/base/macros.h',
1192         '../../src/base/once.cc',
1193         '../../src/base/once.h',
1194         '../../src/base/platform/elapsed-timer.h',
1195         '../../src/base/platform/time.cc',
1196         '../../src/base/platform/time.h',
1197         '../../src/base/platform/condition-variable.cc',
1198         '../../src/base/platform/condition-variable.h',
1199         '../../src/base/platform/mutex.cc',
1200         '../../src/base/platform/mutex.h',
1201         '../../src/base/platform/platform.h',
1202         '../../src/base/platform/semaphore.cc',
1203         '../../src/base/platform/semaphore.h',
1204         '../../src/base/safe_conversions.h',
1205         '../../src/base/safe_conversions_impl.h',
1206         '../../src/base/safe_math.h',
1207         '../../src/base/safe_math_impl.h',
1208         '../../src/base/sys-info.cc',
1209         '../../src/base/sys-info.h',
1210         '../../src/base/utils/random-number-generator.cc',
1211         '../../src/base/utils/random-number-generator.h',
1212       ],
1213       'conditions': [
1214         ['want_separate_host_toolset==1', {
1215           'toolsets': ['host', 'target'],
1216         }, {
1217           'toolsets': ['target'],
1218         }],
1219         ['OS=="linux"', {
1220             'link_settings': {
1221               'libraries': [
1222                 '-lrt'
1223               ]
1224             },
1225             'sources': [
1226               '../../src/base/platform/platform-linux.cc',
1227               '../../src/base/platform/platform-posix.cc'
1228             ],
1229           }
1230         ],
1231         ['OS=="android"', {
1232             'sources': [
1233               '../../src/base/platform/platform-posix.cc'
1234             ],
1235             'conditions': [
1236               ['host_os=="mac"', {
1237                 'target_conditions': [
1238                   ['_toolset=="host"', {
1239                     'sources': [
1240                       '../../src/base/platform/platform-macos.cc'
1241                     ]
1242                   }, {
1243                     'sources': [
1244                       '../../src/base/platform/platform-linux.cc'
1245                     ]
1246                   }],
1247                 ],
1248               }, {
1249                 # TODO(bmeurer): What we really want here, is this:
1250                 #
1251                 # 'link_settings': {
1252                 #   'target_conditions': [
1253                 #     ['_toolset=="host"', {
1254                 #       'libraries': [
1255                 #         '-lrt'
1256                 #       ]
1257                 #     }]
1258                 #   ]
1259                 # },
1260                 #
1261                 # but we can't do this right now, as the AOSP does not support
1262                 # linking against the host librt, so we need to work around this
1263                 # for now, using the following hack (see platform/time.cc):
1264                 'target_conditions': [
1265                   ['_toolset=="host"', {
1266                     'defines': [
1267                       'V8_LIBRT_NOT_AVAILABLE=1',
1268                     ],
1269                   }],
1270                 ],
1271                 'sources': [
1272                   '../../src/base/platform/platform-linux.cc'
1273                 ]
1274               }],
1275             ],
1276           },
1277         ],
1278         ['OS=="qnx"', {
1279             'link_settings': {
1280               'target_conditions': [
1281                 ['_toolset=="host" and host_os=="linux"', {
1282                   'libraries': [
1283                     '-lrt'
1284                   ],
1285                 }],
1286                 ['_toolset=="target"', {
1287                   'libraries': [
1288                     '-lbacktrace'
1289                   ],
1290                 }],
1291               ],
1292             },
1293             'sources': [
1294               '../../src/base/platform/platform-posix.cc',
1295               '../../src/base/qnx-math.h',
1296             ],
1297             'target_conditions': [
1298               ['_toolset=="host" and host_os=="linux"', {
1299                 'sources': [
1300                   '../../src/base/platform/platform-linux.cc'
1301                 ],
1302               }],
1303               ['_toolset=="host" and host_os=="mac"', {
1304                 'sources': [
1305                   '../../src/base/platform/platform-macos.cc'
1306                 ],
1307               }],
1308               ['_toolset=="target"', {
1309                 'sources': [
1310                   '../../src/base/platform/platform-qnx.cc'
1311                 ],
1312               }],
1313             ],
1314           },
1315         ],
1316         ['OS=="freebsd"', {
1317             'link_settings': {
1318               'libraries': [
1319                 '-L/usr/local/lib -lexecinfo',
1320             ]},
1321             'sources': [
1322               '../../src/base/platform/platform-freebsd.cc',
1323               '../../src/base/platform/platform-posix.cc'
1324             ],
1325           }
1326         ],
1327         ['OS=="openbsd"', {
1328             'link_settings': {
1329               'libraries': [
1330                 '-L/usr/local/lib -lexecinfo',
1331             ]},
1332             'sources': [
1333               '../../src/base/platform/platform-openbsd.cc',
1334               '../../src/base/platform/platform-posix.cc'
1335             ],
1336           }
1337         ],
1338         ['OS=="netbsd"', {
1339             'link_settings': {
1340               'libraries': [
1341                 '-L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lexecinfo',
1342             ]},
1343             'sources': [
1344               '../../src/base/platform/platform-openbsd.cc',
1345               '../../src/base/platform/platform-posix.cc'
1346             ],
1347           }
1348         ],
1349         ['OS=="solaris"', {
1350             'link_settings': {
1351               'libraries': [
1352                 '-lnsl',
1353             ]},
1354             'sources': [
1355               '../../src/base/platform/platform-solaris.cc',
1356               '../../src/base/platform/platform-posix.cc'
1357             ],
1358           }
1359         ],
1360         ['OS=="mac"', {
1361           'sources': [
1362             '../../src/base/platform/platform-macos.cc',
1363             '../../src/base/platform/platform-posix.cc'
1364           ]},
1365         ],
1366         ['OS=="win"', {
1367           'defines': [
1368             '_CRT_RAND_S'  # for rand_s()
1369           ],
1370           'variables': {
1371             'gyp_generators': '<!(echo $GYP_GENERATORS)',
1372           },
1373           'conditions': [
1374             ['gyp_generators=="make"', {
1375               'variables': {
1376                 'build_env': '<!(uname -o)',
1377               },
1378               'conditions': [
1379                 ['build_env=="Cygwin"', {
1380                   'sources': [
1381                     '../../src/base/platform/platform-cygwin.cc',
1382                     '../../src/base/platform/platform-posix.cc'
1383                   ],
1384                 }, {
1385                   'sources': [
1386                     '../../src/base/platform/platform-win32.cc',
1387                     '../../src/base/win32-headers.h',
1388                     '../../src/base/win32-math.cc',
1389                     '../../src/base/win32-math.h'
1390                   ],
1391                 }],
1392               ],
1393               'link_settings':  {
1394                 'libraries': [ '-lwinmm', '-lws2_32' ],
1395               },
1396             }, {
1397               'sources': [
1398                 '../../src/base/platform/platform-win32.cc',
1399                 '../../src/base/win32-headers.h',
1400                 '../../src/base/win32-math.cc',
1401                 '../../src/base/win32-math.h'
1402               ],
1403               'msvs_disabled_warnings': [4351, 4355, 4800],
1404               'link_settings':  {
1405                 'libraries': [ '-lwinmm.lib', '-lws2_32.lib' ],
1406               },
1407             }],
1408           ],
1409         }],
1410       ],
1411     },
1412     {
1413       'target_name': 'v8_libplatform',
1414       'type': 'static_library',
1415       'variables': {
1416         'optimize': 'max',
1417       },
1418       'dependencies': [
1419         'v8_libbase',
1420       ],
1421       'include_dirs+': [
1422         '../..',
1423       ],
1424       'sources': [
1425         '../../include/libplatform/libplatform.h',
1426         '../../src/libplatform/default-platform.cc',
1427         '../../src/libplatform/default-platform.h',
1428         '../../src/libplatform/task-queue.cc',
1429         '../../src/libplatform/task-queue.h',
1430         '../../src/libplatform/worker-thread.cc',
1431         '../../src/libplatform/worker-thread.h',
1432       ],
1433       'conditions': [
1434         ['want_separate_host_toolset==1', {
1435           'toolsets': ['host', 'target'],
1436         }, {
1437           'toolsets': ['target'],
1438         }],
1439       ],
1440     },
1441     {
1442       'target_name': 'natives_blob',
1443       'type': 'none',
1444       'conditions': [
1445         [ 'v8_use_external_startup_data==1', {
1446           'conditions': [
1447             ['want_separate_host_toolset==1', {
1448               'dependencies': ['js2c#host'],
1449             }, {
1450               'dependencies': ['js2c'],
1451             }],
1452           ],
1453           'actions': [{
1454             'action_name': 'concatenate_natives_blob',
1455             'inputs': [
1456               '../../tools/concatenate-files.py',
1457               '<(SHARED_INTERMEDIATE_DIR)/libraries.bin',
1458               '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental.bin',
1459             ],
1460             'conditions': [
1461               ['want_separate_host_toolset==1', {
1462                 'target_conditions': [
1463                   ['_toolset=="host"', {
1464                     'outputs': [
1465                       '<(PRODUCT_DIR)/natives_blob_host.bin',
1466                     ],
1467                     'action': [
1468                       'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob_host.bin'
1469                     ],
1470                   }, {
1471                     'outputs': [
1472                       '<(PRODUCT_DIR)/natives_blob.bin',
1473                     ],
1474                     'action': [
1475                       'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
1476                     ],
1477                   }],
1478                 ],
1479               }, {
1480                 'outputs': [
1481                   '<(PRODUCT_DIR)/natives_blob.bin',
1482                 ],
1483                 'action': [
1484                   'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
1485                 ],
1486               }],
1487             ],
1488           }],
1489         }],
1490         ['want_separate_host_toolset==1', {
1491           'toolsets': ['host', 'target'],
1492         }, {
1493           'toolsets': ['target'],
1494         }],
1495       ]
1496     },
1497     {
1498       'target_name': 'js2c',
1499       'type': 'none',
1500       'conditions': [
1501         ['want_separate_host_toolset==1', {
1502           'toolsets': ['host'],
1503         }, {
1504           'toolsets': ['target'],
1505         }],
1506         ['v8_enable_i18n_support==1', {
1507           'variables': {
1508             'i18n_library_files': [
1509               '../../src/i18n.js',
1510             ],
1511           },
1512         }, {
1513           'variables': {
1514             'i18n_library_files': [],
1515           },
1516         }],
1517       ],
1518       'variables': {
1519         'library_files': [
1520           '../../src/runtime.js',
1521           '../../src/v8natives.js',
1522           '../../src/symbol.js',
1523           '../../src/array.js',
1524           '../../src/string.js',
1525           '../../src/uri.js',
1526           '../../third_party/fdlibm/fdlibm.js',
1527           '../../src/math.js',
1528           '../../src/apinatives.js',
1529           '../../src/date.js',
1530           '../../src/regexp.js',
1531           '../../src/arraybuffer.js',
1532           '../../src/typedarray.js',
1533           '../../src/generator.js',
1534           '../../src/object-observe.js',
1535           '../../src/collection.js',
1536           '../../src/weak-collection.js',
1537           '../../src/collection-iterator.js',
1538           '../../src/promise.js',
1539           '../../src/messages.js',
1540           '../../src/json.js',
1541           '../../src/array-iterator.js',
1542           '../../src/string-iterator.js',
1543           '../../src/debug-debugger.js',
1544           '../../src/mirror-debugger.js',
1545           '../../src/liveedit-debugger.js',
1546           '../../src/macros.py',
1547         ],
1548         'experimental_library_files': [
1549           '../../src/macros.py',
1550           '../../src/proxy.js',
1551           '../../src/generator.js',
1552           '../../src/harmony-string.js',
1553           '../../src/harmony-array.js',
1554           '../../src/harmony-classes.js',
1555           '../../src/simd128.js',
1556         ],
1557         'libraries_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries.bin',
1558         'libraries_experimental_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental.bin',
1559       },
1560       'actions': [
1561         {
1562           'action_name': 'js2c',
1563           'inputs': [
1564             '../../tools/js2c.py',
1565             '<@(library_files)',
1566             '<@(i18n_library_files)',
1567           ],
1568           'outputs': [
1569             '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
1570           ],
1571           'action': [
1572             'python',
1573             '../../tools/js2c.py',
1574             '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
1575             'CORE',
1576             '<(v8_compress_startup_data)',
1577             '<@(library_files)',
1578             '<@(i18n_library_files)',
1579           ],
1580           'conditions': [
1581             [ 'v8_use_external_startup_data==1', {
1582               'outputs': ['<@(libraries_bin_file)'],
1583               'action': [
1584                 '--startup_blob', '<@(libraries_bin_file)',
1585               ],
1586             }],
1587           ],
1588         },
1589         {
1590           'action_name': 'js2c_experimental',
1591           'inputs': [
1592             '../../tools/js2c.py',
1593             '<@(experimental_library_files)',
1594           ],
1595           'outputs': [
1596             '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
1597           ],
1598           'action': [
1599             'python',
1600             '../../tools/js2c.py',
1601             '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
1602             'EXPERIMENTAL',
1603             '<(v8_compress_startup_data)',
1604             '<@(experimental_library_files)'
1605           ],
1606           'conditions': [
1607             [ 'v8_use_external_startup_data==1', {
1608               'outputs': ['<@(libraries_experimental_bin_file)'],
1609               'action': [
1610                 '--startup_blob', '<@(libraries_experimental_bin_file)'
1611               ],
1612             }],
1613           ],
1614         },
1615       ],
1616     },
1617     {
1618       'target_name': 'postmortem-metadata',
1619       'type': 'none',
1620       'variables': {
1621         'heapobject_files': [
1622             '../../src/objects.h',
1623             '../../src/objects-inl.h',
1624         ],
1625       },
1626       'actions': [
1627           {
1628             'action_name': 'gen-postmortem-metadata',
1629             'inputs': [
1630               '../../tools/gen-postmortem-metadata.py',
1631               '<@(heapobject_files)',
1632             ],
1633             'outputs': [
1634               '<(SHARED_INTERMEDIATE_DIR)/debug-support.cc',
1635             ],
1636             'action': [
1637               'python',
1638               '../../tools/gen-postmortem-metadata.py',
1639               '<@(_outputs)',
1640               '<@(heapobject_files)'
1641             ]
1642           }
1643         ]
1644     },
1645     {
1646       'target_name': 'mksnapshot',
1647       'type': 'executable',
1648       'dependencies': ['v8_base', 'v8_nosnapshot', 'v8_libplatform'],
1649       'include_dirs+': [
1650         '../..',
1651       ],
1652       'sources': [
1653         '../../src/mksnapshot.cc',
1654       ],
1655       'conditions': [
1656         ['want_separate_host_toolset==1', {
1657           'toolsets': ['host'],
1658         }, {
1659           'toolsets': ['target'],
1660         }],
1661         ['v8_compress_startup_data=="bz2"', {
1662           'libraries': [
1663             '-lbz2',
1664           ]
1665         }],
1666       ],
1667     },
1668   ],
1669 }