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