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