blob: a65978270f94d3f1033738e0fec6f30044c1c855 [file] [log] [blame]
Ben Murdochc7cc0282012-03-05 14:35:55 +00001# Copyright 2012 the V8 project authors. All rights reserved.
Steve Blocka7e24c12009-10-30 11:49:00 +00002# 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{
Ben Murdoch69a99ed2011-11-30 16:03:39 +000029 'includes': ['../../build/common.gypi'],
Steve Block9fac8402011-05-12 15:51:54 +010030 'conditions': [
31 ['use_system_v8==0', {
Steve Block9fac8402011-05-12 15:51:54 +010032 'targets': [
Steve Blocka7e24c12009-10-30 11:49:00 +000033 {
Steve Block9fac8402011-05-12 15:51:54 +010034 'target_name': 'v8',
35 'conditions': [
Ben Murdoch69a99ed2011-11-30 16:03:39 +000036 ['want_separate_host_toolset==1', {
37 'toolsets': ['host', 'target'],
38 }, {
39 'toolsets': ['target'],
40 }],
Steve Block9fac8402011-05-12 15:51:54 +010041 ['v8_use_snapshot=="true"', {
42 'dependencies': ['v8_snapshot'],
43 },
44 {
45 'dependencies': ['v8_nosnapshot'],
46 }],
Ben Murdoch257744e2011-11-30 15:57:28 +000047 ['component=="shared_library"', {
Steve Block9fac8402011-05-12 15:51:54 +010048 'type': '<(component)',
49 'sources': [
Ben Murdoch257744e2011-11-30 15:57:28 +000050 # Note: on non-Windows we still build this file so that gyp
51 # has some sources to link into the component.
Steve Block9fac8402011-05-12 15:51:54 +010052 '../../src/v8dll-main.cc',
53 ],
Ben Murdoch257744e2011-11-30 15:57:28 +000054 'conditions': [
55 ['OS=="win"', {
56 'defines': [
57 'BUILDING_V8_SHARED',
58 ],
59 'direct_dependent_settings': {
60 'defines': [
61 'USING_V8_SHARED',
62 ],
63 },
64 }, {
65 'defines': [
66 'V8_SHARED',
67 ],
68 'direct_dependent_settings': {
69 'defines': [
70 'V8_SHARED',
71 ],
72 },
73 }],
Ben Murdoch589d6972011-11-30 16:04:58 +000074 ['soname_version!=""', {
Ben Murdoch592a9fc2012-03-05 11:04:45 +000075 'product_extension': 'so.<(soname_version)',
Ben Murdoch589d6972011-11-30 16:04:58 +000076 }],
Steve Block9fac8402011-05-12 15:51:54 +010077 ],
Steve Block9fac8402011-05-12 15:51:54 +010078 },
79 {
80 'type': 'none',
81 }],
Steve Block8defd9f2010-07-08 12:39:36 +010082 ],
Kristian Monsen50ef84f2010-07-29 15:18:00 +010083 'direct_dependent_settings': {
Steve Block9fac8402011-05-12 15:51:54 +010084 'include_dirs': [
Ben Murdoch69a99ed2011-11-30 16:03:39 +000085 '../../include',
Kristian Monsen50ef84f2010-07-29 15:18:00 +010086 ],
87 },
Steve Block8defd9f2010-07-08 12:39:36 +010088 },
89 {
Steve Block9fac8402011-05-12 15:51:54 +010090 'target_name': 'v8_snapshot',
91 'type': '<(library)',
92 'conditions': [
Ben Murdoch69a99ed2011-11-30 16:03:39 +000093 ['want_separate_host_toolset==1', {
94 'toolsets': ['host', 'target'],
95 'dependencies': ['mksnapshot#host', 'js2c#host'],
96 }, {
97 'toolsets': ['target'],
98 'dependencies': ['mksnapshot', 'js2c'],
99 }],
Ben Murdoch257744e2011-11-30 15:57:28 +0000100 ['component=="shared_library"', {
101 'conditions': [
102 ['OS=="win"', {
103 'defines': [
104 'BUILDING_V8_SHARED',
105 ],
106 'direct_dependent_settings': {
107 'defines': [
108 'USING_V8_SHARED',
109 ],
110 },
111 }, {
112 'defines': [
113 'V8_SHARED',
114 ],
115 'direct_dependent_settings': {
116 'defines': [
117 'V8_SHARED',
118 ],
119 },
120 }],
Steve Block9fac8402011-05-12 15:51:54 +0100121 ],
122 }],
123 ],
124 'dependencies': [
Steve Block9fac8402011-05-12 15:51:54 +0100125 'v8_base',
126 ],
127 'include_dirs+': [
128 '../../src',
129 ],
130 'sources': [
Ben Murdoch257744e2011-11-30 15:57:28 +0000131 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
132 '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
Steve Block9fac8402011-05-12 15:51:54 +0100133 '<(INTERMEDIATE_DIR)/snapshot.cc',
134 ],
135 'actions': [
136 {
137 'action_name': 'run_mksnapshot',
138 'inputs': [
139 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)',
140 ],
141 'outputs': [
142 '<(INTERMEDIATE_DIR)/snapshot.cc',
143 ],
Ben Murdoch257744e2011-11-30 15:57:28 +0000144 'variables': {
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000145 'mksnapshot_flags': [
146 '--log-snapshot-positions',
147 '--logfile', '<(INTERMEDIATE_DIR)/snapshot.log',
148 ],
Ben Murdoch257744e2011-11-30 15:57:28 +0000149 },
150 'conditions': [
151 ['v8_target_arch=="arm"', {
152 # The following rules should be consistent with chromium's
153 # common.gypi and V8's runtime rule to ensure they all generate
154 # the same correct machine code. The following issue is about
155 # V8's runtime rule about vfpv3 and neon:
156 # http://code.google.com/p/v8/issues/detail?id=914
157 'conditions': [
158 ['armv7==1', {
159 # The ARM Architecture Manual mandates VFPv3 if NEON is
160 # available.
161 # The current V8 doesn't use d16-d31, so for vfpv3-d16, we can
162 # also enable vfp3 for the better performance.
163 'conditions': [
164 ['arm_neon!=1 and arm_fpu!="vfpv3" and arm_fpu!="vfpv3-d16"', {
165 'variables': {
166 'mksnapshot_flags': [
167 '--noenable_vfp3',
168 ],
169 },
170 }],
171 ],
172 },{ # else: armv7!=1
173 'variables': {
174 'mksnapshot_flags': [
175 '--noenable_armv7',
176 '--noenable_vfp3',
177 ],
178 },
179 }],
180 ],
181 }],
182 ],
183 'action': [
184 '<@(_inputs)',
185 '<@(mksnapshot_flags)',
186 '<@(_outputs)'
187 ],
Steve Block9fac8402011-05-12 15:51:54 +0100188 },
189 ],
190 },
191 {
192 'target_name': 'v8_nosnapshot',
193 'type': '<(library)',
Steve Block9fac8402011-05-12 15:51:54 +0100194 'dependencies': [
Steve Block9fac8402011-05-12 15:51:54 +0100195 'v8_base',
196 ],
197 'include_dirs+': [
198 '../../src',
199 ],
200 'sources': [
201 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
Ben Murdoch257744e2011-11-30 15:57:28 +0000202 '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
Steve Block9fac8402011-05-12 15:51:54 +0100203 '../../src/snapshot-empty.cc',
Steve Blocka7e24c12009-10-30 11:49:00 +0000204 ],
Steve Blockd0582a62009-12-15 09:54:21 +0000205 'conditions': [
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000206 ['want_separate_host_toolset==1', {
207 'toolsets': ['host', 'target'],
208 'dependencies': ['js2c#host'],
209 }, {
210 'toolsets': ['target'],
211 'dependencies': ['js2c'],
Steve Block9fac8402011-05-12 15:51:54 +0100212 }],
Ben Murdoch257744e2011-11-30 15:57:28 +0000213 ['component=="shared_library"', {
Steve Block9fac8402011-05-12 15:51:54 +0100214 'defines': [
215 'BUILDING_V8_SHARED',
Ben Murdoch257744e2011-11-30 15:57:28 +0000216 'V8_SHARED',
Steve Block9fac8402011-05-12 15:51:54 +0100217 ],
218 }],
219 ]
220 },
221 {
222 'target_name': 'v8_base',
223 'type': '<(library)',
Ben Murdochc7cc0282012-03-05 14:35:55 +0000224 'variables': {
225 'optimize': 'max',
226 },
Steve Block9fac8402011-05-12 15:51:54 +0100227 'include_dirs+': [
228 '../../src',
229 ],
230 'sources': [
231 '../../src/accessors.cc',
232 '../../src/accessors.h',
233 '../../src/allocation.cc',
234 '../../src/allocation.h',
235 '../../src/api.cc',
236 '../../src/api.h',
237 '../../src/apiutils.h',
238 '../../src/arguments.h',
239 '../../src/assembler.cc',
240 '../../src/assembler.h',
241 '../../src/ast.cc',
Steve Block9fac8402011-05-12 15:51:54 +0100242 '../../src/ast.h',
243 '../../src/atomicops_internals_x86_gcc.cc',
244 '../../src/bignum.cc',
245 '../../src/bignum.h',
246 '../../src/bignum-dtoa.cc',
247 '../../src/bignum-dtoa.h',
248 '../../src/bootstrapper.cc',
249 '../../src/bootstrapper.h',
250 '../../src/builtins.cc',
251 '../../src/builtins.h',
252 '../../src/bytecodes-irregexp.h',
253 '../../src/cached-powers.cc',
254 '../../src/cached-powers.h',
255 '../../src/char-predicates-inl.h',
256 '../../src/char-predicates.h',
257 '../../src/checks.cc',
258 '../../src/checks.h',
259 '../../src/circular-queue-inl.h',
260 '../../src/circular-queue.cc',
261 '../../src/circular-queue.h',
262 '../../src/code-stubs.cc',
263 '../../src/code-stubs.h',
264 '../../src/code.h',
Steve Block9fac8402011-05-12 15:51:54 +0100265 '../../src/codegen.cc',
266 '../../src/codegen.h',
267 '../../src/compilation-cache.cc',
268 '../../src/compilation-cache.h',
269 '../../src/compiler.cc',
270 '../../src/compiler.h',
271 '../../src/contexts.cc',
272 '../../src/contexts.h',
273 '../../src/conversions-inl.h',
274 '../../src/conversions.cc',
275 '../../src/conversions.h',
276 '../../src/counters.cc',
277 '../../src/counters.h',
278 '../../src/cpu.h',
279 '../../src/cpu-profiler-inl.h',
280 '../../src/cpu-profiler.cc',
281 '../../src/cpu-profiler.h',
282 '../../src/data-flow.cc',
283 '../../src/data-flow.h',
284 '../../src/dateparser.cc',
285 '../../src/dateparser.h',
286 '../../src/dateparser-inl.h',
287 '../../src/debug.cc',
288 '../../src/debug.h',
289 '../../src/debug-agent.cc',
290 '../../src/debug-agent.h',
291 '../../src/deoptimizer.cc',
292 '../../src/deoptimizer.h',
293 '../../src/disasm.h',
294 '../../src/disassembler.cc',
295 '../../src/disassembler.h',
Steve Block9fac8402011-05-12 15:51:54 +0100296 '../../src/diy-fp.cc',
297 '../../src/diy-fp.h',
298 '../../src/double.h',
Ben Murdoch589d6972011-11-30 16:04:58 +0000299 '../../src/dtoa.cc',
300 '../../src/dtoa.h',
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000301 '../../src/elements.cc',
302 '../../src/elements.h',
Steve Block9fac8402011-05-12 15:51:54 +0100303 '../../src/execution.cc',
304 '../../src/execution.h',
305 '../../src/factory.cc',
306 '../../src/factory.h',
307 '../../src/fast-dtoa.cc',
308 '../../src/fast-dtoa.h',
309 '../../src/flag-definitions.h',
310 '../../src/fixed-dtoa.cc',
311 '../../src/fixed-dtoa.h',
312 '../../src/flags.cc',
313 '../../src/flags.h',
Steve Block9fac8402011-05-12 15:51:54 +0100314 '../../src/frames-inl.h',
315 '../../src/frames.cc',
316 '../../src/frames.h',
317 '../../src/full-codegen.cc',
318 '../../src/full-codegen.h',
319 '../../src/func-name-inferrer.cc',
320 '../../src/func-name-inferrer.h',
321 '../../src/global-handles.cc',
322 '../../src/global-handles.h',
323 '../../src/globals.h',
324 '../../src/handles-inl.h',
325 '../../src/handles.cc',
326 '../../src/handles.h',
327 '../../src/hashmap.cc',
328 '../../src/hashmap.h',
329 '../../src/heap-inl.h',
330 '../../src/heap.cc',
331 '../../src/heap.h',
332 '../../src/heap-profiler.cc',
333 '../../src/heap-profiler.h',
334 '../../src/hydrogen.cc',
335 '../../src/hydrogen.h',
336 '../../src/hydrogen-instructions.cc',
337 '../../src/hydrogen-instructions.h',
338 '../../src/ic-inl.h',
339 '../../src/ic.cc',
340 '../../src/ic.h',
Ben Murdoch592a9fc2012-03-05 11:04:45 +0000341 '../../src/incremental-marking.cc',
342 '../../src/incremental-marking.h',
Steve Block1e0659c2011-05-24 12:43:12 +0100343 '../../src/inspector.cc',
344 '../../src/inspector.h',
Steve Block9fac8402011-05-12 15:51:54 +0100345 '../../src/interpreter-irregexp.cc',
346 '../../src/interpreter-irregexp.h',
Ben Murdoch257744e2011-11-30 15:57:28 +0000347 '../../src/json-parser.h',
Steve Block9fac8402011-05-12 15:51:54 +0100348 '../../src/jsregexp.cc',
349 '../../src/jsregexp.h',
Steve Block44f0eee2011-05-26 01:26:41 +0100350 '../../src/isolate.cc',
351 '../../src/isolate.h',
Steve Block9fac8402011-05-12 15:51:54 +0100352 '../../src/list-inl.h',
353 '../../src/list.h',
Ben Murdoch086aeea2011-05-13 15:57:08 +0100354 '../../src/lithium.cc',
355 '../../src/lithium.h',
Steve Block9fac8402011-05-12 15:51:54 +0100356 '../../src/lithium-allocator.cc',
357 '../../src/lithium-allocator.h',
Steve Block1e0659c2011-05-24 12:43:12 +0100358 '../../src/lithium-allocator-inl.h',
Steve Block9fac8402011-05-12 15:51:54 +0100359 '../../src/liveedit.cc',
360 '../../src/liveedit.h',
Steve Block1e0659c2011-05-24 12:43:12 +0100361 '../../src/liveobjectlist-inl.h',
362 '../../src/liveobjectlist.cc',
363 '../../src/liveobjectlist.h',
Steve Block9fac8402011-05-12 15:51:54 +0100364 '../../src/log-inl.h',
365 '../../src/log-utils.cc',
366 '../../src/log-utils.h',
367 '../../src/log.cc',
368 '../../src/log.h',
369 '../../src/macro-assembler.h',
370 '../../src/mark-compact.cc',
371 '../../src/mark-compact.h',
Steve Block9fac8402011-05-12 15:51:54 +0100372 '../../src/messages.cc',
373 '../../src/messages.h',
374 '../../src/natives.h',
375 '../../src/objects-debug.cc',
376 '../../src/objects-printer.cc',
377 '../../src/objects-inl.h',
378 '../../src/objects-visiting.cc',
379 '../../src/objects-visiting.h',
380 '../../src/objects.cc',
381 '../../src/objects.h',
Steve Block9fac8402011-05-12 15:51:54 +0100382 '../../src/parser.cc',
383 '../../src/parser.h',
Steve Block44f0eee2011-05-26 01:26:41 +0100384 '../../src/platform-tls-mac.h',
385 '../../src/platform-tls-win32.h',
386 '../../src/platform-tls.h',
Steve Block9fac8402011-05-12 15:51:54 +0100387 '../../src/platform.h',
Ben Murdoch257744e2011-11-30 15:57:28 +0000388 '../../src/preparse-data-format.h',
Steve Block9fac8402011-05-12 15:51:54 +0100389 '../../src/preparse-data.cc',
390 '../../src/preparse-data.h',
391 '../../src/preparser.cc',
392 '../../src/preparser.h',
393 '../../src/prettyprinter.cc',
394 '../../src/prettyprinter.h',
395 '../../src/property.cc',
396 '../../src/property.h',
Ben Murdoch592a9fc2012-03-05 11:04:45 +0000397 '../../src/property-details.h',
Steve Block9fac8402011-05-12 15:51:54 +0100398 '../../src/profile-generator-inl.h',
399 '../../src/profile-generator.cc',
400 '../../src/profile-generator.h',
401 '../../src/regexp-macro-assembler-irregexp-inl.h',
402 '../../src/regexp-macro-assembler-irregexp.cc',
403 '../../src/regexp-macro-assembler-irregexp.h',
404 '../../src/regexp-macro-assembler-tracer.cc',
405 '../../src/regexp-macro-assembler-tracer.h',
406 '../../src/regexp-macro-assembler.cc',
407 '../../src/regexp-macro-assembler.h',
408 '../../src/regexp-stack.cc',
409 '../../src/regexp-stack.h',
Steve Block9fac8402011-05-12 15:51:54 +0100410 '../../src/rewriter.cc',
411 '../../src/rewriter.h',
412 '../../src/runtime.cc',
413 '../../src/runtime.h',
414 '../../src/runtime-profiler.cc',
415 '../../src/runtime-profiler.h',
416 '../../src/safepoint-table.cc',
417 '../../src/safepoint-table.h',
Steve Block9fac8402011-05-12 15:51:54 +0100418 '../../src/scanner.cc',
419 '../../src/scanner.h',
Ben Murdoch589d6972011-11-30 16:04:58 +0000420 '../../src/scanner-character-streams.cc',
421 '../../src/scanner-character-streams.h',
Steve Block9fac8402011-05-12 15:51:54 +0100422 '../../src/scopeinfo.cc',
423 '../../src/scopeinfo.h',
424 '../../src/scopes.cc',
425 '../../src/scopes.h',
426 '../../src/serialize.cc',
427 '../../src/serialize.h',
Steve Block44f0eee2011-05-26 01:26:41 +0100428 '../../src/small-pointer-list.h',
Ben Murdoch589d6972011-11-30 16:04:58 +0000429 '../../src/smart-array-pointer.h',
Steve Block9fac8402011-05-12 15:51:54 +0100430 '../../src/snapshot-common.cc',
431 '../../src/snapshot.h',
432 '../../src/spaces-inl.h',
433 '../../src/spaces.cc',
434 '../../src/spaces.h',
Ben Murdoch592a9fc2012-03-05 11:04:45 +0000435 '../../src/store-buffer-inl.h',
436 '../../src/store-buffer.cc',
437 '../../src/store-buffer.h',
Steve Block9fac8402011-05-12 15:51:54 +0100438 '../../src/string-search.cc',
439 '../../src/string-search.h',
440 '../../src/string-stream.cc',
441 '../../src/string-stream.h',
442 '../../src/strtod.cc',
443 '../../src/strtod.h',
444 '../../src/stub-cache.cc',
445 '../../src/stub-cache.h',
446 '../../src/token.cc',
447 '../../src/token.h',
Steve Block9fac8402011-05-12 15:51:54 +0100448 '../../src/type-info.cc',
449 '../../src/type-info.h',
450 '../../src/unbound-queue-inl.h',
451 '../../src/unbound-queue.h',
452 '../../src/unicode-inl.h',
453 '../../src/unicode.cc',
454 '../../src/unicode.h',
Ben Murdoch257744e2011-11-30 15:57:28 +0000455 '../../src/utils-inl.h',
Steve Block9fac8402011-05-12 15:51:54 +0100456 '../../src/utils.cc',
457 '../../src/utils.h',
458 '../../src/v8-counters.cc',
459 '../../src/v8-counters.h',
460 '../../src/v8.cc',
461 '../../src/v8.h',
462 '../../src/v8checks.h',
Ben Murdoch3fb3ca82011-12-02 17:19:32 +0000463 '../../src/v8conversions.cc',
464 '../../src/v8conversions.h',
Steve Block9fac8402011-05-12 15:51:54 +0100465 '../../src/v8globals.h',
Steve Block44f0eee2011-05-26 01:26:41 +0100466 '../../src/v8memory.h',
Steve Block9fac8402011-05-12 15:51:54 +0100467 '../../src/v8threads.cc',
468 '../../src/v8threads.h',
Ben Murdoch3fb3ca82011-12-02 17:19:32 +0000469 '../../src/v8utils.cc',
Steve Block9fac8402011-05-12 15:51:54 +0100470 '../../src/v8utils.h',
471 '../../src/variables.cc',
472 '../../src/variables.h',
473 '../../src/version.cc',
474 '../../src/version.h',
Steve Block9fac8402011-05-12 15:51:54 +0100475 '../../src/vm-state-inl.h',
476 '../../src/vm-state.h',
477 '../../src/zone-inl.h',
478 '../../src/zone.cc',
479 '../../src/zone.h',
480 '../../src/extensions/externalize-string-extension.cc',
481 '../../src/extensions/externalize-string-extension.h',
482 '../../src/extensions/gc-extension.cc',
483 '../../src/extensions/gc-extension.h',
484 ],
485 'conditions': [
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000486 ['want_separate_host_toolset==1', {
487 'toolsets': ['host', 'target'],
488 }, {
489 'toolsets': ['target'],
490 }],
Steve Block9fac8402011-05-12 15:51:54 +0100491 ['v8_target_arch=="arm"', {
Steve Block9fac8402011-05-12 15:51:54 +0100492 'sources': [
Steve Block9fac8402011-05-12 15:51:54 +0100493 '../../src/arm/assembler-arm-inl.h',
494 '../../src/arm/assembler-arm.cc',
495 '../../src/arm/assembler-arm.h',
496 '../../src/arm/builtins-arm.cc',
497 '../../src/arm/code-stubs-arm.cc',
498 '../../src/arm/code-stubs-arm.h',
499 '../../src/arm/codegen-arm.cc',
500 '../../src/arm/codegen-arm.h',
501 '../../src/arm/constants-arm.h',
502 '../../src/arm/constants-arm.cc',
503 '../../src/arm/cpu-arm.cc',
504 '../../src/arm/debug-arm.cc',
505 '../../src/arm/deoptimizer-arm.cc',
506 '../../src/arm/disasm-arm.cc',
507 '../../src/arm/frames-arm.cc',
508 '../../src/arm/frames-arm.h',
509 '../../src/arm/full-codegen-arm.cc',
510 '../../src/arm/ic-arm.cc',
Steve Block9fac8402011-05-12 15:51:54 +0100511 '../../src/arm/lithium-arm.cc',
512 '../../src/arm/lithium-arm.h',
Ben Murdochb8e0da22011-05-16 14:20:40 +0100513 '../../src/arm/lithium-codegen-arm.cc',
514 '../../src/arm/lithium-codegen-arm.h',
Ben Murdoche0cee9b2011-05-25 10:26:03 +0100515 '../../src/arm/lithium-gap-resolver-arm.cc',
516 '../../src/arm/lithium-gap-resolver-arm.h',
Steve Block9fac8402011-05-12 15:51:54 +0100517 '../../src/arm/macro-assembler-arm.cc',
518 '../../src/arm/macro-assembler-arm.h',
519 '../../src/arm/regexp-macro-assembler-arm.cc',
520 '../../src/arm/regexp-macro-assembler-arm.h',
Steve Block9fac8402011-05-12 15:51:54 +0100521 '../../src/arm/simulator-arm.cc',
522 '../../src/arm/stub-cache-arm.cc',
Steve Block9fac8402011-05-12 15:51:54 +0100523 ],
Steve Block9fac8402011-05-12 15:51:54 +0100524 }],
525 ['v8_target_arch=="ia32" or v8_target_arch=="mac" or OS=="mac"', {
Steve Block9fac8402011-05-12 15:51:54 +0100526 'sources': [
Steve Block9fac8402011-05-12 15:51:54 +0100527 '../../src/ia32/assembler-ia32-inl.h',
528 '../../src/ia32/assembler-ia32.cc',
529 '../../src/ia32/assembler-ia32.h',
530 '../../src/ia32/builtins-ia32.cc',
531 '../../src/ia32/code-stubs-ia32.cc',
532 '../../src/ia32/code-stubs-ia32.h',
533 '../../src/ia32/codegen-ia32.cc',
534 '../../src/ia32/codegen-ia32.h',
535 '../../src/ia32/cpu-ia32.cc',
536 '../../src/ia32/debug-ia32.cc',
537 '../../src/ia32/deoptimizer-ia32.cc',
538 '../../src/ia32/disasm-ia32.cc',
539 '../../src/ia32/frames-ia32.cc',
540 '../../src/ia32/frames-ia32.h',
541 '../../src/ia32/full-codegen-ia32.cc',
542 '../../src/ia32/ic-ia32.cc',
Steve Block9fac8402011-05-12 15:51:54 +0100543 '../../src/ia32/lithium-codegen-ia32.cc',
544 '../../src/ia32/lithium-codegen-ia32.h',
Ben Murdochb8e0da22011-05-16 14:20:40 +0100545 '../../src/ia32/lithium-gap-resolver-ia32.cc',
546 '../../src/ia32/lithium-gap-resolver-ia32.h',
Steve Block9fac8402011-05-12 15:51:54 +0100547 '../../src/ia32/lithium-ia32.cc',
548 '../../src/ia32/lithium-ia32.h',
549 '../../src/ia32/macro-assembler-ia32.cc',
550 '../../src/ia32/macro-assembler-ia32.h',
551 '../../src/ia32/regexp-macro-assembler-ia32.cc',
552 '../../src/ia32/regexp-macro-assembler-ia32.h',
Steve Block9fac8402011-05-12 15:51:54 +0100553 '../../src/ia32/stub-cache-ia32.cc',
Steve Block9fac8402011-05-12 15:51:54 +0100554 ],
555 }],
Ben Murdoch592a9fc2012-03-05 11:04:45 +0000556 ['v8_target_arch=="mips"', {
557 'sources': [
558 '../../src/mips/assembler-mips.cc',
559 '../../src/mips/assembler-mips.h',
560 '../../src/mips/assembler-mips-inl.h',
561 '../../src/mips/builtins-mips.cc',
562 '../../src/mips/codegen-mips.cc',
563 '../../src/mips/codegen-mips.h',
564 '../../src/mips/code-stubs-mips.cc',
565 '../../src/mips/code-stubs-mips.h',
566 '../../src/mips/constants-mips.cc',
567 '../../src/mips/constants-mips.h',
568 '../../src/mips/cpu-mips.cc',
569 '../../src/mips/debug-mips.cc',
570 '../../src/mips/deoptimizer-mips.cc',
571 '../../src/mips/disasm-mips.cc',
572 '../../src/mips/frames-mips.cc',
573 '../../src/mips/frames-mips.h',
574 '../../src/mips/full-codegen-mips.cc',
575 '../../src/mips/ic-mips.cc',
576 '../../src/mips/lithium-codegen-mips.cc',
577 '../../src/mips/lithium-codegen-mips.h',
578 '../../src/mips/lithium-gap-resolver-mips.cc',
579 '../../src/mips/lithium-gap-resolver-mips.h',
580 '../../src/mips/lithium-mips.cc',
581 '../../src/mips/lithium-mips.h',
582 '../../src/mips/macro-assembler-mips.cc',
583 '../../src/mips/macro-assembler-mips.h',
584 '../../src/mips/regexp-macro-assembler-mips.cc',
585 '../../src/mips/regexp-macro-assembler-mips.h',
586 '../../src/mips/simulator-mips.cc',
587 '../../src/mips/stub-cache-mips.cc',
588 ],
589 }],
Steve Block9fac8402011-05-12 15:51:54 +0100590 ['v8_target_arch=="x64" or v8_target_arch=="mac" or OS=="mac"', {
Steve Block9fac8402011-05-12 15:51:54 +0100591 'sources': [
Steve Block9fac8402011-05-12 15:51:54 +0100592 '../../src/x64/assembler-x64-inl.h',
593 '../../src/x64/assembler-x64.cc',
594 '../../src/x64/assembler-x64.h',
595 '../../src/x64/builtins-x64.cc',
596 '../../src/x64/code-stubs-x64.cc',
597 '../../src/x64/code-stubs-x64.h',
598 '../../src/x64/codegen-x64.cc',
599 '../../src/x64/codegen-x64.h',
600 '../../src/x64/cpu-x64.cc',
601 '../../src/x64/debug-x64.cc',
602 '../../src/x64/deoptimizer-x64.cc',
603 '../../src/x64/disasm-x64.cc',
604 '../../src/x64/frames-x64.cc',
605 '../../src/x64/frames-x64.h',
606 '../../src/x64/full-codegen-x64.cc',
607 '../../src/x64/ic-x64.cc',
Ben Murdochb8e0da22011-05-16 14:20:40 +0100608 '../../src/x64/lithium-codegen-x64.cc',
Ben Murdoch086aeea2011-05-13 15:57:08 +0100609 '../../src/x64/lithium-codegen-x64.h',
Steve Block1e0659c2011-05-24 12:43:12 +0100610 '../../src/x64/lithium-gap-resolver-x64.cc',
611 '../../src/x64/lithium-gap-resolver-x64.h',
Ben Murdoch086aeea2011-05-13 15:57:08 +0100612 '../../src/x64/lithium-x64.cc',
613 '../../src/x64/lithium-x64.h',
Steve Block9fac8402011-05-12 15:51:54 +0100614 '../../src/x64/macro-assembler-x64.cc',
615 '../../src/x64/macro-assembler-x64.h',
616 '../../src/x64/regexp-macro-assembler-x64.cc',
617 '../../src/x64/regexp-macro-assembler-x64.h',
Steve Block9fac8402011-05-12 15:51:54 +0100618 '../../src/x64/stub-cache-x64.cc',
Steve Block9fac8402011-05-12 15:51:54 +0100619 ],
620 }],
621 ['OS=="linux"', {
622 'link_settings': {
Ben Murdoch257744e2011-11-30 15:57:28 +0000623 'conditions': [
624 ['v8_compress_startup_data=="bz2"', {
625 'libraries': [
626 '-lbz2',
Ben Murdoch592a9fc2012-03-05 11:04:45 +0000627 ]
628 }],
Ben Murdoch257744e2011-11-30 15:57:28 +0000629 ],
630 },
Steve Block9fac8402011-05-12 15:51:54 +0100631 'sources': [
632 '../../src/platform-linux.cc',
633 '../../src/platform-posix.cc'
634 ],
635 }
636 ],
Ben Murdoch257744e2011-11-30 15:57:28 +0000637 ['OS=="android"', {
Ben Murdoch592a9fc2012-03-05 11:04:45 +0000638 'defines': [
639 'CAN_USE_VFP_INSTRUCTIONS',
640 ],
Ben Murdoch257744e2011-11-30 15:57:28 +0000641 'sources': [
642 '../../src/platform-posix.cc',
643 ],
644 'conditions': [
Ben Murdoch592a9fc2012-03-05 11:04:45 +0000645 ['host_os=="mac"', {
646 'target_conditions': [
647 ['_toolset=="host"', {
648 'sources': [
649 '../../src/platform-macos.cc'
650 ]
651 }, {
652 'sources': [
653 '../../src/platform-linux.cc'
654 ]
655 }],
656 ],
Ben Murdoch257744e2011-11-30 15:57:28 +0000657 }, {
658 'sources': [
659 '../../src/platform-linux.cc'
660 ]
661 }],
Ben Murdoch257744e2011-11-30 15:57:28 +0000662 ],
663 },
664 ],
Steve Block9fac8402011-05-12 15:51:54 +0100665 ['OS=="freebsd"', {
666 'link_settings': {
667 'libraries': [
668 '-L/usr/local/lib -lexecinfo',
669 ]},
670 'sources': [
671 '../../src/platform-freebsd.cc',
672 '../../src/platform-posix.cc'
673 ],
674 }
675 ],
676 ['OS=="openbsd"', {
677 'link_settings': {
678 'libraries': [
679 '-L/usr/local/lib -lexecinfo',
680 ]},
681 'sources': [
682 '../../src/platform-openbsd.cc',
683 '../../src/platform-posix.cc'
684 ],
685 }
686 ],
Ben Murdochc7cc0282012-03-05 14:35:55 +0000687 ['OS=="netbsd"', {
688 'link_settings': {
689 'libraries': [
690 '-L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lexecinfo',
691 ]},
692 'sources': [
693 '../../src/platform-openbsd.cc',
694 '../../src/platform-posix.cc'
695 ],
696 }
697 ],
Ben Murdoch592a9fc2012-03-05 11:04:45 +0000698 ['OS=="solaris"', {
Ben Murdochc7cc0282012-03-05 14:35:55 +0000699 'link_settings': {
700 'libraries': [
701 '-lsocket -lnsl',
702 ]},
Ben Murdoch592a9fc2012-03-05 11:04:45 +0000703 'sources': [
704 '../../src/platform-solaris.cc',
705 '../../src/platform-posix.cc',
706 ],
707 }
708 ],
Steve Block9fac8402011-05-12 15:51:54 +0100709 ['OS=="mac"', {
710 'sources': [
711 '../../src/platform-macos.cc',
712 '../../src/platform-posix.cc'
713 ]},
714 ],
715 ['OS=="win"', {
716 'sources': [
717 '../../src/platform-win32.cc',
Ben Murdoch589d6972011-11-30 16:04:58 +0000718 '../../src/win32-math.cc',
719 '../../src/win32-math.h',
Steve Block9fac8402011-05-12 15:51:54 +0100720 ],
Steve Block1e0659c2011-05-24 12:43:12 +0100721 'msvs_disabled_warnings': [4351, 4355, 4800],
Steve Block9fac8402011-05-12 15:51:54 +0100722 'link_settings': {
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000723 'libraries': [ '-lwinmm.lib', '-lws2_32.lib' ],
Steve Block9fac8402011-05-12 15:51:54 +0100724 },
725 }],
Ben Murdoch257744e2011-11-30 15:57:28 +0000726 ['component=="shared_library"', {
Steve Block9fac8402011-05-12 15:51:54 +0100727 'defines': [
Ben Murdoch257744e2011-11-30 15:57:28 +0000728 'BUILDING_V8_SHARED',
729 'V8_SHARED',
Steve Block9fac8402011-05-12 15:51:54 +0100730 ],
731 }],
732 ],
733 },
734 {
735 'target_name': 'js2c',
736 'type': 'none',
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000737 'conditions': [
738 ['want_separate_host_toolset==1', {
739 'toolsets': ['host'],
740 }, {
741 'toolsets': ['target'],
742 }],
743 ],
Steve Block9fac8402011-05-12 15:51:54 +0100744 'variables': {
745 'library_files': [
746 '../../src/runtime.js',
747 '../../src/v8natives.js',
748 '../../src/array.js',
749 '../../src/string.js',
750 '../../src/uri.js',
751 '../../src/math.js',
752 '../../src/messages.js',
753 '../../src/apinatives.js',
754 '../../src/debug-debugger.js',
755 '../../src/mirror-debugger.js',
756 '../../src/liveedit-debugger.js',
757 '../../src/date.js',
758 '../../src/json.js',
759 '../../src/regexp.js',
760 '../../src/macros.py',
761 ],
Ben Murdoch257744e2011-11-30 15:57:28 +0000762 'experimental_library_files': [
Ben Murdoch257744e2011-11-30 15:57:28 +0000763 '../../src/macros.py',
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000764 '../../src/proxy.js',
Ben Murdoch592a9fc2012-03-05 11:04:45 +0000765 '../../src/collection.js',
Ben Murdoch257744e2011-11-30 15:57:28 +0000766 ],
Steve Block9fac8402011-05-12 15:51:54 +0100767 },
768 'actions': [
769 {
770 'action_name': 'js2c',
771 'inputs': [
772 '../../tools/js2c.py',
773 '<@(library_files)',
774 ],
775 'outputs': [
776 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
Steve Block9fac8402011-05-12 15:51:54 +0100777 ],
778 'action': [
779 'python',
780 '../../tools/js2c.py',
781 '<@(_outputs)',
782 'CORE',
Ben Murdoch3fb3ca82011-12-02 17:19:32 +0000783 '<(v8_compress_startup_data)',
Steve Block9fac8402011-05-12 15:51:54 +0100784 '<@(library_files)'
785 ],
786 },
Ben Murdoch257744e2011-11-30 15:57:28 +0000787 {
788 'action_name': 'js2c_experimental',
789 'inputs': [
790 '../../tools/js2c.py',
791 '<@(experimental_library_files)',
792 ],
793 'outputs': [
794 '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
795 ],
796 'action': [
797 'python',
798 '../../tools/js2c.py',
799 '<@(_outputs)',
800 'EXPERIMENTAL',
Ben Murdoch3fb3ca82011-12-02 17:19:32 +0000801 '<(v8_compress_startup_data)',
Ben Murdoch257744e2011-11-30 15:57:28 +0000802 '<@(experimental_library_files)'
803 ],
804 },
Steve Block9fac8402011-05-12 15:51:54 +0100805 ],
806 },
807 {
808 'target_name': 'mksnapshot',
809 'type': 'executable',
Steve Block9fac8402011-05-12 15:51:54 +0100810 'dependencies': [
Ben Murdoch592a9fc2012-03-05 11:04:45 +0000811 'v8_base',
Steve Block9fac8402011-05-12 15:51:54 +0100812 'v8_nosnapshot',
813 ],
814 'include_dirs+': [
815 '../../src',
816 ],
817 'sources': [
818 '../../src/mksnapshot.cc',
819 ],
820 'conditions': [
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000821 ['want_separate_host_toolset==1', {
822 'toolsets': ['host'],
823 }, {
824 'toolsets': ['target'],
Ben Murdoch257744e2011-11-30 15:57:28 +0000825 }],
826 ['v8_compress_startup_data=="bz2"', {
827 'libraries': [
828 '-lbz2',
Ben Murdoch592a9fc2012-03-05 11:04:45 +0000829 ]
830 }],
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000831 ],
Steve Block9fac8402011-05-12 15:51:54 +0100832 },
Steve Blocka7e24c12009-10-30 11:49:00 +0000833 {
Steve Block9fac8402011-05-12 15:51:54 +0100834 'target_name': 'v8_shell',
835 'type': 'executable',
836 'dependencies': [
837 'v8'
Steve Blocka7e24c12009-10-30 11:49:00 +0000838 ],
Steve Block9fac8402011-05-12 15:51:54 +0100839 'sources': [
840 '../../samples/shell.cc',
Steve Blocka7e24c12009-10-30 11:49:00 +0000841 ],
Steve Block9fac8402011-05-12 15:51:54 +0100842 'conditions': [
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000843 ['want_separate_host_toolset==1', {
844 'toolsets': ['host'],
845 }, {
846 'toolsets': ['target'],
847 }],
Steve Block9fac8402011-05-12 15:51:54 +0100848 ['OS=="win"', {
849 # This could be gotten by not setting chromium_code, if that's OK.
850 'defines': ['_CRT_SECURE_NO_WARNINGS'],
851 }],
Ben Murdoch257744e2011-11-30 15:57:28 +0000852 ['v8_compress_startup_data=="bz2"', {
853 'libraries': [
854 '-lbz2',
Ben Murdoch592a9fc2012-03-05 11:04:45 +0000855 ]
856 }],
Steve Blocka7e24c12009-10-30 11:49:00 +0000857 ],
858 },
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000859 {
860 'target_name': 'preparser_lib',
861 'type': '<(library)',
862 'include_dirs+': [
863 '../../src',
864 ],
865 'sources': [
Ben Murdoch589d6972011-11-30 16:04:58 +0000866 '../../include/v8-preparser.h',
867 '../../include/v8stdint.h',
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000868 '../../src/allocation.cc',
Ben Murdoch589d6972011-11-30 16:04:58 +0000869 '../../src/allocation.h',
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000870 '../../src/bignum.cc',
Ben Murdoch589d6972011-11-30 16:04:58 +0000871 '../../src/bignum.h',
872 '../../src/bignum-dtoa.cc',
873 '../../src/bignum-dtoa.h',
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000874 '../../src/cached-powers.cc',
Ben Murdoch589d6972011-11-30 16:04:58 +0000875 '../../src/cached-powers.h',
876 '../../src/char-predicates-inl.h',
877 '../../src/char-predicates.h',
878 '../../src/checks.h',
879 '../../src/conversions-inl.h',
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000880 '../../src/conversions.cc',
Ben Murdoch589d6972011-11-30 16:04:58 +0000881 '../../src/conversions.h',
882 '../../src/diy-fp.cc',
883 '../../src/diy-fp.h',
884 '../../src/double.h',
885 '../../src/dtoa.cc',
886 '../../src/dtoa.h',
887 '../../src/fast-dtoa.cc',
888 '../../src/fast-dtoa.h',
889 '../../src/fixed-dtoa.cc',
890 '../../src/fixed-dtoa.h',
891 '../../src/globals.h',
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000892 '../../src/hashmap.cc',
Ben Murdoch589d6972011-11-30 16:04:58 +0000893 '../../src/hashmap.h',
894 '../../src/list-inl.h',
895 '../../src/list.h',
896 '../../src/preparse-data-format.h',
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000897 '../../src/preparse-data.cc',
Ben Murdoch589d6972011-11-30 16:04:58 +0000898 '../../src/preparse-data.h',
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000899 '../../src/preparser.cc',
Ben Murdoch589d6972011-11-30 16:04:58 +0000900 '../../src/preparser.h',
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000901 '../../src/preparser-api.cc',
Ben Murdoch589d6972011-11-30 16:04:58 +0000902 '../../src/scanner.cc',
903 '../../src/scanner.h',
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000904 '../../src/strtod.cc',
Ben Murdoch589d6972011-11-30 16:04:58 +0000905 '../../src/strtod.h',
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000906 '../../src/token.cc',
Ben Murdoch589d6972011-11-30 16:04:58 +0000907 '../../src/token.h',
908 '../../src/unicode-inl.h',
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000909 '../../src/unicode.cc',
Ben Murdoch589d6972011-11-30 16:04:58 +0000910 '../../src/unicode.h',
911 '../../src/utils-inl.h',
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000912 '../../src/utils.cc',
Ben Murdoch589d6972011-11-30 16:04:58 +0000913 '../../src/utils.h',
914 ],
915 'conditions': [
916 ['OS=="win"', {
917 'sources': [
918 '../../src/win32-math.cc',
919 '../../src/win32-math.h',
920 ]}],
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000921 ],
922 },
Steve Blocka7e24c12009-10-30 11:49:00 +0000923 ],
Steve Block9fac8402011-05-12 15:51:54 +0100924 }, { # use_system_v8 != 0
925 'targets': [
926 {
927 'target_name': 'v8',
Ben Murdoch592a9fc2012-03-05 11:04:45 +0000928 'type': 'none',
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000929 'conditions': [
930 ['want_separate_host_toolset==1', {
931 'toolsets': ['host', 'target'],
932 }, {
933 'toolsets': ['target'],
934 }],
935 ],
Steve Block9fac8402011-05-12 15:51:54 +0100936 'link_settings': {
937 'libraries': [
938 '-lv8',
939 ],
940 },
941 },
942 {
943 'target_name': 'v8_shell',
944 'type': 'none',
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000945 'conditions': [
946 ['want_separate_host_toolset==1', {
947 'toolsets': ['host'],
948 }, {
949 'toolsets': ['target'],
950 }],
951 ],
Steve Block9fac8402011-05-12 15:51:54 +0100952 'dependencies': [
953 'v8'
954 ],
955 },
Steve Blocka7e24c12009-10-30 11:49:00 +0000956 ],
Steve Block9fac8402011-05-12 15:51:54 +0100957 }],
Steve Blocka7e24c12009-10-30 11:49:00 +0000958 ],
959}