e4a04165859242de25f5a26a5254649e4b9c6287
[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     'v8_code': 1,
31     'v8_random_seed%': 314159265,
32   },
33   'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
34   'targets': [
35     {
36       'target_name': 'v8',
37       'dependencies_traverse': 1,
38       'conditions': [
39         ['want_separate_host_toolset==1', {
40           'toolsets': ['host', 'target'],
41         }, {
42           'toolsets': ['target'],
43         }],
44         ['v8_use_snapshot=="true"', {
45           # The dependency on v8_base should come from a transitive
46           # dependency however the Android toolchain requires libv8_base.a
47           # to appear before libv8_snapshot.a so it's listed explicitly.
48           'dependencies': ['v8_base.<(v8_target_arch)', 'v8_snapshot'],
49         },
50         {
51           # The dependency on v8_base should come from a transitive
52           # dependency however the Android toolchain requires libv8_base.a
53           # to appear before libv8_snapshot.a so it's listed explicitly.
54           'dependencies': [
55             'v8_base.<(v8_target_arch)',
56             'v8_nosnapshot.<(v8_target_arch)',
57           ],
58         }],
59         ['component=="shared_library"', {
60           'type': '<(component)',
61           'sources': [
62             # Note: on non-Windows we still build this file so that gyp
63             # has some sources to link into the component.
64             '../../src/v8dll-main.cc',
65           ],
66           'defines': [
67             'V8_SHARED',
68             'BUILDING_V8_SHARED',
69           ],
70           'direct_dependent_settings': {
71             'defines': [
72               'V8_SHARED',
73               'USING_V8_SHARED',
74             ],
75           },
76           'target_conditions': [
77             ['OS=="android" and _toolset=="target"', {
78               'libraries': [
79                 '-llog',
80               ],
81               'include_dirs': [
82                 'src/common/android/include',
83               ],
84             }],
85           ],
86           'conditions': [
87             ['OS=="mac"', {
88               'xcode_settings': {
89                 'OTHER_LDFLAGS': ['-dynamiclib', '-all_load']
90               },
91             }],
92             ['soname_version!=""', {
93               'product_extension': 'so.<(soname_version)',
94             }],
95           ],
96         },
97         {
98           'type': 'none',
99         }],
100       ],
101       'direct_dependent_settings': {
102         'include_dirs': [
103           '../../include',
104         ],
105       },
106     },
107     {
108       'target_name': 'v8_snapshot',
109       'type': 'static_library',
110       'conditions': [
111         ['want_separate_host_toolset==1', {
112           'toolsets': ['host', 'target'],
113           'dependencies': [
114             'mksnapshot.<(v8_target_arch)#host',
115             'js2c#host',
116             'generate_trig_table#host',
117           ],
118         }, {
119           'toolsets': ['target'],
120           'dependencies': [
121             'mksnapshot.<(v8_target_arch)',
122             'js2c',
123             'generate_trig_table',
124           ],
125         }],
126         ['component=="shared_library"', {
127           'defines': [
128             'V8_SHARED',
129             'BUILDING_V8_SHARED',
130           ],
131           'direct_dependent_settings': {
132             'defines': [
133               'V8_SHARED',
134               'USING_V8_SHARED',
135             ],
136           },
137         }],
138       ],
139       'dependencies': [
140         'v8_base.<(v8_target_arch)',
141       ],
142       'include_dirs+': [
143         '../../src',
144       ],
145       'sources': [
146         '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
147         '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
148         '<(SHARED_INTERMEDIATE_DIR)/trig-table.cc',
149         '<(INTERMEDIATE_DIR)/snapshot.cc',
150       ],
151       'actions': [
152         {
153           'action_name': 'run_mksnapshot',
154           'inputs': [
155             '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot.<(v8_target_arch)<(EXECUTABLE_SUFFIX)',
156           ],
157           'outputs': [
158             '<(INTERMEDIATE_DIR)/snapshot.cc',
159           ],
160           'variables': {
161             'mksnapshot_flags': [
162               '--log-snapshot-positions',
163               '--logfile', '<(INTERMEDIATE_DIR)/snapshot.log',
164             ],
165             'conditions': [
166               ['v8_random_seed!=0', {
167                 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'],
168               }],
169             ],
170           },
171           'action': [
172             '<@(_inputs)',
173             '<@(mksnapshot_flags)',
174             '<@(_outputs)'
175           ],
176         },
177       ],
178     },
179     {
180       'target_name': 'v8_nosnapshot.<(v8_target_arch)',
181       'type': 'static_library',
182       'dependencies': [
183         'v8_base.<(v8_target_arch)',
184       ],
185       'include_dirs+': [
186         '../../src',
187       ],
188       'sources': [
189         '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
190         '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
191         '<(SHARED_INTERMEDIATE_DIR)/trig-table.cc',
192         '../../src/snapshot-empty.cc',
193       ],
194       'conditions': [
195         ['want_separate_host_toolset==1', {
196           'toolsets': ['host', 'target'],
197           'dependencies': ['js2c#host', 'generate_trig_table#host'],
198         }, {
199           'toolsets': ['target'],
200           'dependencies': ['js2c', 'generate_trig_table'],
201         }],
202         ['component=="shared_library"', {
203           'defines': [
204             'BUILDING_V8_SHARED',
205             'V8_SHARED',
206           ],
207         }],
208       ]
209     },
210     { 'target_name': 'generate_trig_table',
211       'type': 'none',
212       'conditions': [
213         ['want_separate_host_toolset==1', {
214           'toolsets': ['host'],
215         }, {
216           'toolsets': ['target'],
217         }],
218       ],
219       'actions': [
220         {
221           'action_name': 'generate',
222           'inputs': [
223             '../../tools/generate-trig-table.py',
224           ],
225           'outputs': [
226             '<(SHARED_INTERMEDIATE_DIR)/trig-table.cc',
227           ],
228           'action': [
229             'python',
230             '../../tools/generate-trig-table.py',
231             '<@(_outputs)',
232           ],
233         },
234       ]
235     },
236     {
237       'target_name': 'v8_base.<(v8_target_arch)',
238       'type': 'static_library',
239       'variables': {
240         'optimize': 'max',
241       },
242       'include_dirs+': [
243         '../../src',
244       ],
245       'sources': [  ### gcmole(all) ###
246         '../../src/accessors.cc',
247         '../../src/accessors.h',
248         '../../src/allocation.cc',
249         '../../src/allocation.h',
250         '../../src/allocation-site-scopes.cc',
251         '../../src/allocation-site-scopes.h',
252         '../../src/allocation-tracker.cc',
253         '../../src/allocation-tracker.h',
254         '../../src/api.cc',
255         '../../src/api.h',
256         '../../src/arguments.cc',
257         '../../src/arguments.h',
258         '../../src/assembler.cc',
259         '../../src/assembler.h',
260         '../../src/assert-scope.h',
261         '../../src/ast.cc',
262         '../../src/ast.h',
263         '../../src/atomicops.h',
264         '../../src/atomicops_internals_x86_gcc.cc',
265         '../../src/bignum-dtoa.cc',
266         '../../src/bignum-dtoa.h',
267         '../../src/bignum.cc',
268         '../../src/bignum.h',
269         '../../src/bootstrapper.cc',
270         '../../src/bootstrapper.h',
271         '../../src/builtins.cc',
272         '../../src/builtins.h',
273         '../../src/bytecodes-irregexp.h',
274         '../../src/cached-powers.cc',
275         '../../src/cached-powers.h',
276         '../../src/char-predicates-inl.h',
277         '../../src/char-predicates.h',
278         '../../src/checks.cc',
279         '../../src/checks.h',
280         '../../src/circular-queue-inl.h',
281         '../../src/circular-queue.h',
282         '../../src/code-stubs.cc',
283         '../../src/code-stubs.h',
284         '../../src/code-stubs-hydrogen.cc',
285         '../../src/code.h',
286         '../../src/codegen.cc',
287         '../../src/codegen.h',
288         '../../src/compilation-cache.cc',
289         '../../src/compilation-cache.h',
290         '../../src/compiler.cc',
291         '../../src/compiler.h',
292         '../../src/contexts.cc',
293         '../../src/contexts.h',
294         '../../src/conversions-inl.h',
295         '../../src/conversions.cc',
296         '../../src/conversions.h',
297         '../../src/counters.cc',
298         '../../src/counters.h',
299         '../../src/cpu-profiler-inl.h',
300         '../../src/cpu-profiler.cc',
301         '../../src/cpu-profiler.h',
302         '../../src/cpu.cc',
303         '../../src/cpu.h',
304         '../../src/data-flow.cc',
305         '../../src/data-flow.h',
306         '../../src/date.cc',
307         '../../src/date.h',
308         '../../src/dateparser-inl.h',
309         '../../src/dateparser.cc',
310         '../../src/dateparser.h',
311         '../../src/debug-agent.cc',
312         '../../src/debug-agent.h',
313         '../../src/debug.cc',
314         '../../src/debug.h',
315         '../../src/deoptimizer.cc',
316         '../../src/deoptimizer.h',
317         '../../src/disasm.h',
318         '../../src/disassembler.cc',
319         '../../src/disassembler.h',
320         '../../src/diy-fp.cc',
321         '../../src/diy-fp.h',
322         '../../src/double.h',
323         '../../src/dtoa.cc',
324         '../../src/dtoa.h',
325         '../../src/effects.h',
326         '../../src/elements-kind.cc',
327         '../../src/elements-kind.h',
328         '../../src/elements.cc',
329         '../../src/elements.h',
330         '../../src/execution.cc',
331         '../../src/execution.h',
332         '../../src/extensions/externalize-string-extension.cc',
333         '../../src/extensions/externalize-string-extension.h',
334         '../../src/extensions/free-buffer-extension.cc',
335         '../../src/extensions/free-buffer-extension.h',
336         '../../src/extensions/gc-extension.cc',
337         '../../src/extensions/gc-extension.h',
338         '../../src/extensions/statistics-extension.cc',
339         '../../src/extensions/statistics-extension.h',
340         '../../src/extensions/trigger-failure-extension.cc',
341         '../../src/extensions/trigger-failure-extension.h',
342         '../../src/factory.cc',
343         '../../src/factory.h',
344         '../../src/fast-dtoa.cc',
345         '../../src/fast-dtoa.h',
346         '../../src/fixed-dtoa.cc',
347         '../../src/fixed-dtoa.h',
348         '../../src/flag-definitions.h',
349         '../../src/flags.cc',
350         '../../src/flags.h',
351         '../../src/frames-inl.h',
352         '../../src/frames.cc',
353         '../../src/frames.h',
354         '../../src/full-codegen.cc',
355         '../../src/full-codegen.h',
356         '../../src/func-name-inferrer.cc',
357         '../../src/func-name-inferrer.h',
358         '../../src/gdb-jit.cc',
359         '../../src/gdb-jit.h',
360         '../../src/global-handles.cc',
361         '../../src/global-handles.h',
362         '../../src/globals.h',
363         '../../src/handles-inl.h',
364         '../../src/handles.cc',
365         '../../src/handles.h',
366         '../../src/hashmap.h',
367         '../../src/heap-inl.h',
368         '../../src/heap-profiler.cc',
369         '../../src/heap-profiler.h',
370         '../../src/heap-snapshot-generator-inl.h',
371         '../../src/heap-snapshot-generator.cc',
372         '../../src/heap-snapshot-generator.h',
373         '../../src/heap.cc',
374         '../../src/heap.h',
375         '../../src/hydrogen-alias-analysis.h',
376         '../../src/hydrogen-bce.cc',
377         '../../src/hydrogen-bce.h',
378         '../../src/hydrogen-bch.cc',
379         '../../src/hydrogen-bch.h',
380         '../../src/hydrogen-canonicalize.cc',
381         '../../src/hydrogen-canonicalize.h',
382         '../../src/hydrogen-check-elimination.cc',
383         '../../src/hydrogen-check-elimination.h',
384         '../../src/hydrogen-dce.cc',
385         '../../src/hydrogen-dce.h',
386         '../../src/hydrogen-dehoist.cc',
387         '../../src/hydrogen-dehoist.h',
388         '../../src/hydrogen-environment-liveness.cc',
389         '../../src/hydrogen-environment-liveness.h',
390         '../../src/hydrogen-escape-analysis.cc',
391         '../../src/hydrogen-escape-analysis.h',
392         '../../src/hydrogen-flow-engine.h',
393         '../../src/hydrogen-instructions.cc',
394         '../../src/hydrogen-instructions.h',
395         '../../src/hydrogen.cc',
396         '../../src/hydrogen.h',
397         '../../src/hydrogen-gvn.cc',
398         '../../src/hydrogen-gvn.h',
399         '../../src/hydrogen-infer-representation.cc',
400         '../../src/hydrogen-infer-representation.h',
401         '../../src/hydrogen-infer-types.cc',
402         '../../src/hydrogen-infer-types.h',
403         '../../src/hydrogen-load-elimination.cc',
404         '../../src/hydrogen-load-elimination.h',
405         '../../src/hydrogen-mark-deoptimize.cc',
406         '../../src/hydrogen-mark-deoptimize.h',
407         '../../src/hydrogen-mark-unreachable.cc',
408         '../../src/hydrogen-mark-unreachable.h',
409         '../../src/hydrogen-minus-zero.cc',
410         '../../src/hydrogen-minus-zero.h',
411         '../../src/hydrogen-osr.cc',
412         '../../src/hydrogen-osr.h',
413         '../../src/hydrogen-range-analysis.cc',
414         '../../src/hydrogen-range-analysis.h',
415         '../../src/hydrogen-redundant-phi.cc',
416         '../../src/hydrogen-redundant-phi.h',
417         '../../src/hydrogen-removable-simulates.cc',
418         '../../src/hydrogen-removable-simulates.h',
419         '../../src/hydrogen-representation-changes.cc',
420         '../../src/hydrogen-representation-changes.h',
421         '../../src/hydrogen-sce.cc',
422         '../../src/hydrogen-sce.h',
423         '../../src/hydrogen-uint32-analysis.cc',
424         '../../src/hydrogen-uint32-analysis.h',
425         '../../src/i18n.cc',
426         '../../src/i18n.h',
427         '../../src/icu_util.cc',
428         '../../src/icu_util.h',
429         '../../src/ic-inl.h',
430         '../../src/ic.cc',
431         '../../src/ic.h',
432         '../../src/incremental-marking.cc',
433         '../../src/incremental-marking.h',
434         '../../src/interface.cc',
435         '../../src/interface.h',
436         '../../src/interpreter-irregexp.cc',
437         '../../src/interpreter-irregexp.h',
438         '../../src/isolate.cc',
439         '../../src/isolate.h',
440         '../../src/json-parser.h',
441         '../../src/json-stringifier.h',
442         '../../src/jsregexp-inl.h',
443         '../../src/jsregexp.cc',
444         '../../src/jsregexp.h',
445         '../../src/lazy-instance.h',
446         # TODO(jochen): move libplatform/ files to their own target.
447         '../../src/libplatform/default-platform.cc',
448         '../../src/libplatform/default-platform.h',
449         '../../src/libplatform/task-queue.cc',
450         '../../src/libplatform/task-queue.h',
451         '../../src/libplatform/worker-thread.cc',
452         '../../src/libplatform/worker-thread.h',
453         '../../src/list-inl.h',
454         '../../src/list.h',
455         '../../src/lithium-allocator-inl.h',
456         '../../src/lithium-allocator.cc',
457         '../../src/lithium-allocator.h',
458         '../../src/lithium-codegen.cc',
459         '../../src/lithium-codegen.h',
460         '../../src/lithium.cc',
461         '../../src/lithium.h',
462         '../../src/liveedit.cc',
463         '../../src/liveedit.h',
464         '../../src/log-inl.h',
465         '../../src/log-utils.cc',
466         '../../src/log-utils.h',
467         '../../src/log.cc',
468         '../../src/log.h',
469         '../../src/macro-assembler.h',
470         '../../src/mark-compact.cc',
471         '../../src/mark-compact.h',
472         '../../src/messages.cc',
473         '../../src/messages.h',
474         '../../src/natives.h',
475         '../../src/objects-debug.cc',
476         '../../src/objects-inl.h',
477         '../../src/objects-printer.cc',
478         '../../src/objects-visiting.cc',
479         '../../src/objects-visiting.h',
480         '../../src/objects.cc',
481         '../../src/objects.h',
482         '../../src/once.cc',
483         '../../src/once.h',
484         '../../src/optimizing-compiler-thread.h',
485         '../../src/optimizing-compiler-thread.cc',
486         '../../src/parser.cc',
487         '../../src/parser.h',
488         '../../src/platform/elapsed-timer.h',
489         '../../src/platform/time.cc',
490         '../../src/platform/time.h',
491         '../../src/platform.h',
492         '../../src/platform/condition-variable.cc',
493         '../../src/platform/condition-variable.h',
494         '../../src/platform/mutex.cc',
495         '../../src/platform/mutex.h',
496         '../../src/platform/semaphore.cc',
497         '../../src/platform/semaphore.h',
498         '../../src/platform/socket.cc',
499         '../../src/platform/socket.h',
500         '../../src/preparse-data-format.h',
501         '../../src/preparse-data.cc',
502         '../../src/preparse-data.h',
503         '../../src/preparser.cc',
504         '../../src/preparser.h',
505         '../../src/prettyprinter.cc',
506         '../../src/prettyprinter.h',
507         '../../src/profile-generator-inl.h',
508         '../../src/profile-generator.cc',
509         '../../src/profile-generator.h',
510         '../../src/property-details.h',
511         '../../src/property.cc',
512         '../../src/property.h',
513         '../../src/regexp-macro-assembler-irregexp-inl.h',
514         '../../src/regexp-macro-assembler-irregexp.cc',
515         '../../src/regexp-macro-assembler-irregexp.h',
516         '../../src/regexp-macro-assembler-tracer.cc',
517         '../../src/regexp-macro-assembler-tracer.h',
518         '../../src/regexp-macro-assembler.cc',
519         '../../src/regexp-macro-assembler.h',
520         '../../src/regexp-stack.cc',
521         '../../src/regexp-stack.h',
522         '../../src/rewriter.cc',
523         '../../src/rewriter.h',
524         '../../src/runtime-profiler.cc',
525         '../../src/runtime-profiler.h',
526         '../../src/runtime.cc',
527         '../../src/runtime.h',
528         '../../src/safepoint-table.cc',
529         '../../src/safepoint-table.h',
530         '../../src/sampler.cc',
531         '../../src/sampler.h',
532         '../../src/scanner-character-streams.cc',
533         '../../src/scanner-character-streams.h',
534         '../../src/scanner.cc',
535         '../../src/scanner.h',
536         '../../src/scopeinfo.cc',
537         '../../src/scopeinfo.h',
538         '../../src/scopes.cc',
539         '../../src/scopes.h',
540         '../../src/serialize.cc',
541         '../../src/serialize.h',
542         '../../src/small-pointer-list.h',
543         '../../src/smart-pointers.h',
544         '../../src/snapshot-common.cc',
545         '../../src/snapshot.h',
546         '../../src/spaces-inl.h',
547         '../../src/spaces.cc',
548         '../../src/spaces.h',
549         '../../src/store-buffer-inl.h',
550         '../../src/store-buffer.cc',
551         '../../src/store-buffer.h',
552         '../../src/string-search.cc',
553         '../../src/string-search.h',
554         '../../src/string-stream.cc',
555         '../../src/string-stream.h',
556         '../../src/strtod.cc',
557         '../../src/strtod.h',
558         '../../src/stub-cache.cc',
559         '../../src/stub-cache.h',
560         '../../src/sweeper-thread.h',
561         '../../src/sweeper-thread.cc',
562         '../../src/token.cc',
563         '../../src/token.h',
564         '../../src/transitions-inl.h',
565         '../../src/transitions.cc',
566         '../../src/transitions.h',
567         '../../src/type-info.cc',
568         '../../src/type-info.h',
569         '../../src/types.cc',
570         '../../src/types.h',
571         '../../src/typing.cc',
572         '../../src/typing.h',
573         '../../src/unbound-queue-inl.h',
574         '../../src/unbound-queue.h',
575         '../../src/unicode-inl.h',
576         '../../src/unicode.cc',
577         '../../src/unicode.h',
578         '../../src/unique.h',
579         '../../src/uri.h',
580         '../../src/utils-inl.h',
581         '../../src/utils.cc',
582         '../../src/utils.h',
583         '../../src/utils/random-number-generator.cc',
584         '../../src/utils/random-number-generator.h',
585         '../../src/v8-counters.cc',
586         '../../src/v8-counters.h',
587         '../../src/v8.cc',
588         '../../src/v8.h',
589         '../../src/v8checks.h',
590         '../../src/v8conversions.cc',
591         '../../src/v8conversions.h',
592         '../../src/v8globals.h',
593         '../../src/v8memory.h',
594         '../../src/v8threads.cc',
595         '../../src/v8threads.h',
596         '../../src/v8utils.cc',
597         '../../src/v8utils.h',
598         '../../src/variables.cc',
599         '../../src/variables.h',
600         '../../src/version.cc',
601         '../../src/version.h',
602         '../../src/vm-state-inl.h',
603         '../../src/vm-state.h',
604         '../../src/zone-inl.h',
605         '../../src/zone.cc',
606         '../../src/zone.h',
607       ],
608       'conditions': [
609         ['want_separate_host_toolset==1', {
610           'toolsets': ['host', 'target'],
611         }, {
612           'toolsets': ['target'],
613         }],
614         ['v8_target_arch=="arm"', {
615           'sources': [  ### gcmole(arch:arm) ###
616             '../../src/arm/assembler-arm-inl.h',
617             '../../src/arm/assembler-arm.cc',
618             '../../src/arm/assembler-arm.h',
619             '../../src/arm/builtins-arm.cc',
620             '../../src/arm/code-stubs-arm.cc',
621             '../../src/arm/code-stubs-arm.h',
622             '../../src/arm/codegen-arm.cc',
623             '../../src/arm/codegen-arm.h',
624             '../../src/arm/constants-arm.h',
625             '../../src/arm/constants-arm.cc',
626             '../../src/arm/cpu-arm.cc',
627             '../../src/arm/debug-arm.cc',
628             '../../src/arm/deoptimizer-arm.cc',
629             '../../src/arm/disasm-arm.cc',
630             '../../src/arm/frames-arm.cc',
631             '../../src/arm/frames-arm.h',
632             '../../src/arm/full-codegen-arm.cc',
633             '../../src/arm/ic-arm.cc',
634             '../../src/arm/lithium-arm.cc',
635             '../../src/arm/lithium-arm.h',
636             '../../src/arm/lithium-codegen-arm.cc',
637             '../../src/arm/lithium-codegen-arm.h',
638             '../../src/arm/lithium-gap-resolver-arm.cc',
639             '../../src/arm/lithium-gap-resolver-arm.h',
640             '../../src/arm/macro-assembler-arm.cc',
641             '../../src/arm/macro-assembler-arm.h',
642             '../../src/arm/regexp-macro-assembler-arm.cc',
643             '../../src/arm/regexp-macro-assembler-arm.h',
644             '../../src/arm/simulator-arm.cc',
645             '../../src/arm/stub-cache-arm.cc',
646           ],
647         }],
648         ['v8_target_arch=="ia32" or v8_target_arch=="mac" or OS=="mac"', {
649           'sources': [  ### gcmole(arch:ia32) ###
650             '../../src/ia32/assembler-ia32-inl.h',
651             '../../src/ia32/assembler-ia32.cc',
652             '../../src/ia32/assembler-ia32.h',
653             '../../src/ia32/builtins-ia32.cc',
654             '../../src/ia32/code-stubs-ia32.cc',
655             '../../src/ia32/code-stubs-ia32.h',
656             '../../src/ia32/codegen-ia32.cc',
657             '../../src/ia32/codegen-ia32.h',
658             '../../src/ia32/cpu-ia32.cc',
659             '../../src/ia32/debug-ia32.cc',
660             '../../src/ia32/deoptimizer-ia32.cc',
661             '../../src/ia32/disasm-ia32.cc',
662             '../../src/ia32/frames-ia32.cc',
663             '../../src/ia32/frames-ia32.h',
664             '../../src/ia32/full-codegen-ia32.cc',
665             '../../src/ia32/ic-ia32.cc',
666             '../../src/ia32/lithium-codegen-ia32.cc',
667             '../../src/ia32/lithium-codegen-ia32.h',
668             '../../src/ia32/lithium-gap-resolver-ia32.cc',
669             '../../src/ia32/lithium-gap-resolver-ia32.h',
670             '../../src/ia32/lithium-ia32.cc',
671             '../../src/ia32/lithium-ia32.h',
672             '../../src/ia32/macro-assembler-ia32.cc',
673             '../../src/ia32/macro-assembler-ia32.h',
674             '../../src/ia32/regexp-macro-assembler-ia32.cc',
675             '../../src/ia32/regexp-macro-assembler-ia32.h',
676             '../../src/ia32/stub-cache-ia32.cc',
677           ],
678         }],
679         ['v8_target_arch=="mipsel"', {
680           'sources': [  ### gcmole(arch:mipsel) ###
681             '../../src/mips/assembler-mips.cc',
682             '../../src/mips/assembler-mips.h',
683             '../../src/mips/assembler-mips-inl.h',
684             '../../src/mips/builtins-mips.cc',
685             '../../src/mips/codegen-mips.cc',
686             '../../src/mips/codegen-mips.h',
687             '../../src/mips/code-stubs-mips.cc',
688             '../../src/mips/code-stubs-mips.h',
689             '../../src/mips/constants-mips.cc',
690             '../../src/mips/constants-mips.h',
691             '../../src/mips/cpu-mips.cc',
692             '../../src/mips/debug-mips.cc',
693             '../../src/mips/deoptimizer-mips.cc',
694             '../../src/mips/disasm-mips.cc',
695             '../../src/mips/frames-mips.cc',
696             '../../src/mips/frames-mips.h',
697             '../../src/mips/full-codegen-mips.cc',
698             '../../src/mips/ic-mips.cc',
699             '../../src/mips/lithium-codegen-mips.cc',
700             '../../src/mips/lithium-codegen-mips.h',
701             '../../src/mips/lithium-gap-resolver-mips.cc',
702             '../../src/mips/lithium-gap-resolver-mips.h',
703             '../../src/mips/lithium-mips.cc',
704             '../../src/mips/lithium-mips.h',
705             '../../src/mips/macro-assembler-mips.cc',
706             '../../src/mips/macro-assembler-mips.h',
707             '../../src/mips/regexp-macro-assembler-mips.cc',
708             '../../src/mips/regexp-macro-assembler-mips.h',
709             '../../src/mips/simulator-mips.cc',
710             '../../src/mips/stub-cache-mips.cc',
711           ],
712         }],
713         ['v8_target_arch=="x64" or v8_target_arch=="mac" or OS=="mac"', {
714           'sources': [  ### gcmole(arch:x64) ###
715             '../../src/x64/assembler-x64-inl.h',
716             '../../src/x64/assembler-x64.cc',
717             '../../src/x64/assembler-x64.h',
718             '../../src/x64/builtins-x64.cc',
719             '../../src/x64/code-stubs-x64.cc',
720             '../../src/x64/code-stubs-x64.h',
721             '../../src/x64/codegen-x64.cc',
722             '../../src/x64/codegen-x64.h',
723             '../../src/x64/cpu-x64.cc',
724             '../../src/x64/debug-x64.cc',
725             '../../src/x64/deoptimizer-x64.cc',
726             '../../src/x64/disasm-x64.cc',
727             '../../src/x64/frames-x64.cc',
728             '../../src/x64/frames-x64.h',
729             '../../src/x64/full-codegen-x64.cc',
730             '../../src/x64/ic-x64.cc',
731             '../../src/x64/lithium-codegen-x64.cc',
732             '../../src/x64/lithium-codegen-x64.h',
733             '../../src/x64/lithium-gap-resolver-x64.cc',
734             '../../src/x64/lithium-gap-resolver-x64.h',
735             '../../src/x64/lithium-x64.cc',
736             '../../src/x64/lithium-x64.h',
737             '../../src/x64/macro-assembler-x64.cc',
738             '../../src/x64/macro-assembler-x64.h',
739             '../../src/x64/regexp-macro-assembler-x64.cc',
740             '../../src/x64/regexp-macro-assembler-x64.h',
741             '../../src/x64/stub-cache-x64.cc',
742           ],
743         }],
744         ['OS=="linux"', {
745             'link_settings': {
746               'conditions': [
747                 ['v8_compress_startup_data=="bz2"', {
748                   'libraries': [
749                     '-lbz2',
750                   ]
751                 }],
752               ],
753               'libraries': [
754                 '-lrt'
755               ]
756             },
757             'sources': [  ### gcmole(os:linux) ###
758               '../../src/platform-linux.cc',
759               '../../src/platform-posix.cc'
760             ],
761           }
762         ],
763         ['OS=="android"', {
764             'defines': [
765               'CAN_USE_VFP_INSTRUCTIONS',
766             ],
767             'sources': [
768               '../../src/platform-posix.cc'
769             ],
770             'conditions': [
771               ['host_os=="mac"', {
772                 'target_conditions': [
773                   ['_toolset=="host"', {
774                     'sources': [
775                       '../../src/platform-macos.cc'
776                     ]
777                   }, {
778                     'sources': [
779                       '../../src/platform-linux.cc'
780                     ]
781                   }],
782                 ],
783               }, {
784                 # TODO(bmeurer): What we really want here, is this:
785                 #
786                 # 'link_settings': {
787                 #   'target_conditions': [
788                 #     ['_toolset=="host"', {
789                 #       'libraries': [
790                 #         '-lrt'
791                 #       ]
792                 #     }]
793                 #   ]
794                 # },
795                 #
796                 # but we can't do this right now, as the AOSP does not support
797                 # linking against the host librt, so we need to work around this
798                 # for now, using the following hack (see platform/time.cc):
799                 'target_conditions': [
800                   ['_toolset=="host"', {
801                     'defines': [
802                       'V8_LIBRT_NOT_AVAILABLE=1',
803                     ],
804                   }],
805                 ],
806                 'sources': [
807                   '../../src/platform-linux.cc'
808                 ]
809               }],
810             ],
811           },
812         ],
813         ['OS=="qnx"', {
814             'link_settings': {
815               'target_conditions': [
816                 ['_toolset=="host" and host_os=="linux"', {
817                   'libraries': [
818                     '-lrt'
819                   ],
820                 }],
821                 ['_toolset=="target"', {
822                   'libraries': [
823                     '-lbacktrace', '-lsocket'
824                   ],
825                 }],
826               ],
827             },
828             'sources': [
829               '../../src/platform-posix.cc',
830             ],
831             'target_conditions': [
832               ['_toolset=="host" and host_os=="linux"', {
833                 'sources': [
834                   '../../src/platform-linux.cc'
835                 ],
836               }],
837               ['_toolset=="host" and host_os=="mac"', {
838                 'sources': [
839                   '../../src/platform-macos.cc'
840                 ],
841               }],
842               ['_toolset=="target"', {
843                 'sources': [
844                   '../../src/platform-qnx.cc'
845                 ],
846               }],
847             ],
848           },
849         ],
850         ['OS=="freebsd"', {
851             'link_settings': {
852               'libraries': [
853                 '-L/usr/local/lib -lexecinfo',
854             ]},
855             'sources': [
856               '../../src/platform-freebsd.cc',
857               '../../src/platform-posix.cc'
858             ],
859           }
860         ],
861         ['OS=="openbsd"', {
862             'link_settings': {
863               'libraries': [
864                 '-L/usr/local/lib -lexecinfo',
865             ]},
866             'sources': [
867               '../../src/platform-openbsd.cc',
868               '../../src/platform-posix.cc'
869             ],
870           }
871         ],
872         ['OS=="netbsd"', {
873             'link_settings': {
874               'libraries': [
875                 '-L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lexecinfo',
876             ]},
877             'sources': [
878               '../../src/platform-openbsd.cc',
879               '../../src/platform-posix.cc'
880             ],
881           }
882         ],
883         ['OS=="solaris"', {
884             'link_settings': {
885               'libraries': [
886                 '-lsocket -lnsl',
887             ]},
888             'sources': [
889               '../../src/platform-solaris.cc',
890               '../../src/platform-posix.cc'
891             ],
892           }
893         ],
894         ['OS=="mac"', {
895           'sources': [
896             '../../src/platform-macos.cc',
897             '../../src/platform-posix.cc'
898           ]},
899         ],
900         ['OS=="win"', {
901           'defines': [
902             '_CRT_RAND_S'  # for rand_s()
903           ],
904           'variables': {
905             'gyp_generators': '<!(echo $GYP_GENERATORS)',
906           },
907           'conditions': [
908             ['gyp_generators=="make"', {
909               'variables': {
910                 'build_env': '<!(uname -o)',
911               },
912               'conditions': [
913                 ['build_env=="Cygwin"', {
914                   'sources': [
915                     '../../src/platform-cygwin.cc',
916                     '../../src/platform-posix.cc'
917                   ],
918                 }, {
919                   'sources': [
920                     '../../src/platform-win32.cc',
921                     '../../src/win32-math.cc',
922                     '../../src/win32-math.h'
923                   ],
924                 }],
925               ],
926               'link_settings':  {
927                 'libraries': [ '-lwinmm', '-lws2_32' ],
928               },
929             }, {
930               'sources': [
931                 '../../src/platform-win32.cc',
932                 '../../src/win32-math.cc',
933                 '../../src/win32-math.h'
934               ],
935               'msvs_disabled_warnings': [4351, 4355, 4800],
936               'link_settings':  {
937                 'libraries': [ '-lwinmm.lib', '-lws2_32.lib' ],
938               },
939             }],
940           ],
941         }],
942         ['component=="shared_library"', {
943           'defines': [
944             'BUILDING_V8_SHARED',
945             'V8_SHARED',
946           ],
947         }],
948         ['v8_postmortem_support=="true"', {
949           'sources': [
950             '<(SHARED_INTERMEDIATE_DIR)/debug-support.cc',
951           ]
952         }],
953         ['v8_enable_i18n_support==1', {
954           'dependencies': [
955             '<(icu_gyp_path):icui18n',
956             '<(icu_gyp_path):icuuc',
957           ]
958         }, {  # v8_enable_i18n_support==0
959           'sources!': [
960             '../../src/i18n.cc',
961             '../../src/i18n.h',
962           ],
963         }],
964         ['OS=="win" and v8_enable_i18n_support==1', {
965           'dependencies': [
966             '<(icu_gyp_path):icudata',
967           ],
968         }],
969         ['v8_use_default_platform==0', {
970           'sources!': [
971             '../../src/default-platform.cc',
972             '../../src/default-platform.h',
973           ],
974         }],
975       ],
976     },
977     {
978       'target_name': 'js2c',
979       'type': 'none',
980       'conditions': [
981         ['want_separate_host_toolset==1', {
982           'toolsets': ['host'],
983         }, {
984           'toolsets': ['target'],
985         }],
986         ['v8_enable_i18n_support==1', {
987           'variables': {
988             'i18n_library_files': [
989               '../../src/i18n.js',
990             ],
991           },
992         }, {
993           'variables': {
994             'i18n_library_files': [],
995           },
996         }],
997       ],
998       'variables': {
999         'library_files': [
1000           '../../src/runtime.js',
1001           '../../src/v8natives.js',
1002           '../../src/array.js',
1003           '../../src/string.js',
1004           '../../src/uri.js',
1005           '../../src/math.js',
1006           '../../src/messages.js',
1007           '../../src/apinatives.js',
1008           '../../src/debug-debugger.js',
1009           '../../src/mirror-debugger.js',
1010           '../../src/liveedit-debugger.js',
1011           '../../src/date.js',
1012           '../../src/json.js',
1013           '../../src/regexp.js',
1014           '../../src/arraybuffer.js',
1015           '../../src/typedarray.js',
1016           '../../src/macros.py',
1017         ],
1018         'experimental_library_files': [
1019           '../../src/macros.py',
1020           '../../src/symbol.js',
1021           '../../src/proxy.js',
1022           '../../src/collection.js',
1023           '../../src/object-observe.js',
1024           '../../src/promise.js',
1025           '../../src/generator.js',
1026           '../../src/array-iterator.js',
1027           '../../src/harmony-string.js',
1028           '../../src/harmony-array.js',
1029           '../../src/harmony-math.js',
1030           '../../src/simd128.js',
1031         ],
1032       },
1033       'actions': [
1034         {
1035           'action_name': 'js2c',
1036           'inputs': [
1037             '../../tools/js2c.py',
1038             '<@(library_files)',
1039             '<@(i18n_library_files)',
1040           ],
1041           'outputs': [
1042             '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
1043           ],
1044           'action': [
1045             'python',
1046             '../../tools/js2c.py',
1047             '<@(_outputs)',
1048             'CORE',
1049             '<(v8_compress_startup_data)',
1050             '<@(library_files)',
1051             '<@(i18n_library_files)',
1052           ],
1053         },
1054         {
1055           'action_name': 'js2c_experimental',
1056           'inputs': [
1057             '../../tools/js2c.py',
1058             '<@(experimental_library_files)',
1059           ],
1060           'outputs': [
1061             '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
1062           ],
1063           'action': [
1064             'python',
1065             '../../tools/js2c.py',
1066             '<@(_outputs)',
1067             'EXPERIMENTAL',
1068             '<(v8_compress_startup_data)',
1069             '<@(experimental_library_files)'
1070           ],
1071         },
1072       ],
1073     },
1074     {
1075       'target_name': 'postmortem-metadata',
1076       'type': 'none',
1077       'variables': {
1078         'heapobject_files': [
1079             '../../src/objects.h',
1080             '../../src/objects-inl.h',
1081         ],
1082       },
1083       'actions': [
1084           {
1085             'action_name': 'gen-postmortem-metadata',
1086             'inputs': [
1087               '../../tools/gen-postmortem-metadata.py',
1088               '<@(heapobject_files)',
1089             ],
1090             'outputs': [
1091               '<(SHARED_INTERMEDIATE_DIR)/debug-support.cc',
1092             ],
1093             'action': [
1094               'python',
1095               '../../tools/gen-postmortem-metadata.py',
1096               '<@(_outputs)',
1097               '<@(heapobject_files)'
1098             ]
1099           }
1100         ]
1101     },
1102     {
1103       'target_name': 'mksnapshot.<(v8_target_arch)',
1104       'type': 'executable',
1105       'dependencies': [
1106         'v8_base.<(v8_target_arch)',
1107         'v8_nosnapshot.<(v8_target_arch)',
1108       ],
1109       'include_dirs+': [
1110         '../../src',
1111       ],
1112       'sources': [
1113         '../../src/mksnapshot.cc',
1114       ],
1115       'conditions': [
1116         ['want_separate_host_toolset==1', {
1117           'toolsets': ['host'],
1118         }, {
1119           'toolsets': ['target'],
1120         }],
1121         ['v8_compress_startup_data=="bz2"', {
1122           'libraries': [
1123             '-lbz2',
1124           ]
1125         }],
1126       ],
1127     },
1128   ],
1129 }