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