blob: 050cb95a36474b8ebc0df6b768f93262a41ce6ba [file] [log] [blame]
ager@chromium.org3a37e9b2009-04-27 09:26:21 +00001# Copyright 2009 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 'chromium_code': 1,
31 'msvs_use_common_release': 0,
kasperl@chromium.org71affb52009-05-26 05:44:31 +000032 'gcc_version%': 'unknown',
ager@chromium.org3a37e9b2009-04-27 09:26:21 +000033 'base_source_files': [
34 '../../src/arm/assembler-arm-inl.h',
35 '../../src/arm/assembler-arm.cc',
36 '../../src/arm/assembler-arm.h',
37 '../../src/arm/builtins-arm.cc',
38 '../../src/arm/codegen-arm.cc',
39 '../../src/arm/codegen-arm.h',
40 '../../src/arm/constants-arm.h',
41 '../../src/arm/cpu-arm.cc',
42 '../../src/arm/debug-arm.cc',
43 '../../src/arm/disasm-arm.cc',
44 '../../src/arm/frames-arm.cc',
45 '../../src/arm/frames-arm.h',
46 '../../src/arm/ic-arm.cc',
47 '../../src/arm/jump-target-arm.cc',
48 '../../src/arm/macro-assembler-arm.cc',
49 '../../src/arm/macro-assembler-arm.h',
50 '../../src/arm/regexp-macro-assembler-arm.cc',
51 '../../src/arm/regexp-macro-assembler-arm.h',
52 '../../src/arm/register-allocator-arm.cc',
53 '../../src/arm/simulator-arm.cc',
54 '../../src/arm/stub-cache-arm.cc',
55 '../../src/arm/virtual-frame-arm.cc',
56 '../../src/arm/virtual-frame-arm.h',
57 '../../src/ia32/assembler-ia32-inl.h',
58 '../../src/ia32/assembler-ia32.cc',
59 '../../src/ia32/assembler-ia32.h',
60 '../../src/ia32/builtins-ia32.cc',
61 '../../src/ia32/codegen-ia32.cc',
62 '../../src/ia32/codegen-ia32.h',
63 '../../src/ia32/cpu-ia32.cc',
64 '../../src/ia32/debug-ia32.cc',
65 '../../src/ia32/disasm-ia32.cc',
66 '../../src/ia32/frames-ia32.cc',
67 '../../src/ia32/frames-ia32.h',
68 '../../src/ia32/ic-ia32.cc',
69 '../../src/ia32/jump-target-ia32.cc',
70 '../../src/ia32/macro-assembler-ia32.cc',
71 '../../src/ia32/macro-assembler-ia32.h',
72 '../../src/ia32/regexp-macro-assembler-ia32.cc',
73 '../../src/ia32/regexp-macro-assembler-ia32.h',
74 '../../src/ia32/register-allocator-ia32.cc',
75 '../../src/ia32/stub-cache-ia32.cc',
76 '../../src/ia32/virtual-frame-ia32.cc',
77 '../../src/ia32/virtual-frame-ia32.h',
78 '../../src/third_party/dtoa/dtoa.c',
79 '../../src/accessors.cc',
80 '../../src/accessors.h',
81 '../../src/allocation.cc',
82 '../../src/allocation.h',
83 '../../src/api.cc',
84 '../../src/api.h',
85 '../../src/apiutils.h',
86 '../../src/arguments.h',
87 '../../src/assembler.cc',
88 '../../src/assembler.h',
89 '../../src/ast.cc',
90 '../../src/ast.h',
91 '../../src/bootstrapper.cc',
92 '../../src/bootstrapper.h',
93 '../../src/builtins.cc',
94 '../../src/builtins.h',
95 '../../src/bytecodes-irregexp.h',
96 '../../src/char-predicates-inl.h',
97 '../../src/char-predicates.h',
98 '../../src/checks.cc',
99 '../../src/checks.h',
100 '../../src/code-stubs.cc',
101 '../../src/code-stubs.h',
102 '../../src/code.h',
103 '../../src/codegen-inl.h',
104 '../../src/codegen.cc',
105 '../../src/codegen.h',
106 '../../src/compilation-cache.cc',
107 '../../src/compilation-cache.h',
108 '../../src/compiler.cc',
109 '../../src/compiler.h',
110 '../../src/contexts.cc',
111 '../../src/contexts.h',
112 '../../src/conversions-inl.h',
113 '../../src/conversions.cc',
114 '../../src/conversions.h',
115 '../../src/counters.cc',
116 '../../src/counters.h',
117 '../../src/cpu.h',
118 '../../src/dateparser.cc',
119 '../../src/dateparser.h',
120 '../../src/dateparser-inl.h',
121 '../../src/debug.cc',
122 '../../src/debug.h',
123 '../../src/debug-agent.cc',
124 '../../src/debug-agent.h',
125 '../../src/disasm.h',
126 '../../src/disassembler.cc',
127 '../../src/disassembler.h',
128 '../../src/dtoa-config.c',
129 '../../src/execution.cc',
130 '../../src/execution.h',
131 '../../src/factory.cc',
132 '../../src/factory.h',
133 '../../src/flag-definitions.h',
134 '../../src/flags.cc',
135 '../../src/flags.h',
136 '../../src/frames-inl.h',
137 '../../src/frames.cc',
138 '../../src/frames.h',
kasperl@chromium.orgb3284ad2009-05-18 06:12:45 +0000139 '../../src/frame-element.h',
ager@chromium.org3a37e9b2009-04-27 09:26:21 +0000140 '../../src/func-name-inferrer.cc',
141 '../../src/func-name-inferrer.h',
142 '../../src/global-handles.cc',
143 '../../src/global-handles.h',
144 '../../src/globals.h',
145 '../../src/handles-inl.h',
146 '../../src/handles.cc',
147 '../../src/handles.h',
148 '../../src/hashmap.cc',
149 '../../src/hashmap.h',
150 '../../src/heap-inl.h',
151 '../../src/heap.cc',
152 '../../src/heap.h',
153 '../../src/ic-inl.h',
154 '../../src/ic.cc',
155 '../../src/ic.h',
156 '../../src/interpreter-irregexp.cc',
157 '../../src/interpreter-irregexp.h',
158 '../../src/jump-target.cc',
159 '../../src/jump-target.h',
kasperl@chromium.orgb3284ad2009-05-18 06:12:45 +0000160 '../../src/jump-target-inl.h',
ager@chromium.org3a37e9b2009-04-27 09:26:21 +0000161 '../../src/jsregexp-inl.h',
162 '../../src/jsregexp.cc',
163 '../../src/jsregexp.h',
164 '../../src/list-inl.h',
165 '../../src/list.h',
166 '../../src/log.cc',
167 '../../src/log.h',
168 '../../src/macro-assembler.h',
169 '../../src/mark-compact.cc',
170 '../../src/mark-compact.h',
171 '../../src/memory.h',
172 '../../src/messages.cc',
173 '../../src/messages.h',
174 '../../src/natives.h',
175 '../../src/objects-debug.cc',
176 '../../src/objects-inl.h',
177 '../../src/objects.cc',
178 '../../src/objects.h',
179 '../../src/oprofile-agent.h',
180 '../../src/oprofile-agent.cc',
181 '../../src/parser.cc',
182 '../../src/parser.h',
183 '../../src/platform-freebsd.cc',
184 '../../src/platform-linux.cc',
185 '../../src/platform-macos.cc',
186 '../../src/platform-nullos.cc',
187 '../../src/platform-posix.cc',
188 '../../src/platform-win32.cc',
189 '../../src/platform.h',
190 '../../src/prettyprinter.cc',
191 '../../src/prettyprinter.h',
192 '../../src/property.cc',
193 '../../src/property.h',
194 '../../src/regexp-macro-assembler-irregexp-inl.h',
195 '../../src/regexp-macro-assembler-irregexp.cc',
196 '../../src/regexp-macro-assembler-irregexp.h',
197 '../../src/regexp-macro-assembler-tracer.cc',
198 '../../src/regexp-macro-assembler-tracer.h',
199 '../../src/regexp-macro-assembler.cc',
200 '../../src/regexp-macro-assembler.h',
201 '../../src/regexp-stack.cc',
202 '../../src/regexp-stack.h',
203 '../../src/register-allocator.h',
204 '../../src/register-allocator-inl.h',
205 '../../src/register-allocator.cc',
206 '../../src/rewriter.cc',
207 '../../src/rewriter.h',
208 '../../src/runtime.cc',
209 '../../src/runtime.h',
210 '../../src/scanner.cc',
211 '../../src/scanner.h',
212 '../../src/scopeinfo.cc',
213 '../../src/scopeinfo.h',
214 '../../src/scopes.cc',
215 '../../src/scopes.h',
216 '../../src/serialize.cc',
217 '../../src/serialize.h',
218 '../../src/shell.h',
219 '../../src/smart-pointer.h',
220 '../../src/snapshot-common.cc',
221 '../../src/snapshot.h',
222 '../../src/spaces-inl.h',
223 '../../src/spaces.cc',
224 '../../src/spaces.h',
225 '../../src/string-stream.cc',
226 '../../src/string-stream.h',
227 '../../src/stub-cache.cc',
228 '../../src/stub-cache.h',
229 '../../src/token.cc',
230 '../../src/token.h',
231 '../../src/top.cc',
232 '../../src/top.h',
233 '../../src/unicode-inl.h',
234 '../../src/unicode.cc',
235 '../../src/unicode.h',
236 '../../src/usage-analyzer.cc',
237 '../../src/usage-analyzer.h',
238 '../../src/utils.cc',
239 '../../src/utils.h',
240 '../../src/v8-counters.cc',
241 '../../src/v8-counters.h',
242 '../../src/v8.cc',
243 '../../src/v8.h',
244 '../../src/v8threads.cc',
245 '../../src/v8threads.h',
246 '../../src/variables.cc',
247 '../../src/variables.h',
ager@chromium.org5ec48922009-05-05 07:25:34 +0000248 '../../src/version.cc',
249 '../../src/version.h',
ager@chromium.org3a37e9b2009-04-27 09:26:21 +0000250 '../../src/virtual-frame.h',
251 '../../src/virtual-frame.cc',
252 '../../src/zone-inl.h',
253 '../../src/zone.cc',
254 '../../src/zone.h',
255 ],
256 'not_base_source_files': [
257 # These files are #included by others and are not meant to be compiled
258 # directly.
259 '../../src/third_party/dtoa/dtoa.c',
260 ],
261 'd8_source_files': [
262 '../../src/d8-debug.cc',
263 '../../src/d8-posix.cc',
264 '../../src/d8-readline.cc',
265 '../../src/d8-windows.cc',
266 '../../src/d8.cc',
267 ],
268 },
269 'includes': [
270 '../../../build/common.gypi',
271 ],
272 'target_defaults': {
273 'defines': [
274 'ENABLE_LOGGING_AND_PROFILING',
275 ],
276 'configurations': {
277 'Debug': {
278 'defines': [
279 'DEBUG',
280 '_DEBUG',
281 'ENABLE_DISASSEMBLER',
282 ],
283 'msvs_settings': {
284 'VCCLCompilerTool': {
285 'Optimizations': '0',
286 'RuntimeLibrary': '1',
287 },
288 'VCLinkerTool': {
289 'LinkIncremental': '2',
290 },
291 },
292 },
293 'Release': {
294 'conditions': [
295 ['OS=="linux"', {
296 'cflags!': [
297 '-O2',
298 ],
299 'cflags': [
300 '-fomit-frame-pointer',
301 '-O3',
302 ],
kasperl@chromium.org71affb52009-05-26 05:44:31 +0000303 'conditions': [
304 [ 'gcc_version=="44"', {
305 'cflags': [
306 # Avoid gcc 4.4 strict aliasing issues in dtoa.c
307 '-fno-strict-aliasing',
308 # Avoid gcc 4.4 mksnapshot segfault.
309 '-fno-tree-vectorize',
310 # Avoid crashes with gcc 4.4 in the v8 test suite.
311 '-fno-tree-vrp',
312 ],
313 }],
314 ],
ager@chromium.org3a37e9b2009-04-27 09:26:21 +0000315 'cflags_cc': [
316 '-fno-rtti',
317 ],
318 }],
319 ['OS=="win"', {
320 'msvs_configuration_attributes': {
321 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
322 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
323 'CharacterSet': '1',
324 },
325 'msvs_settings': {
326 'VCCLCompilerTool': {
327 'RuntimeLibrary': '0',
328 'Optimizations': '2',
329 'InlineFunctionExpansion': '2',
330 'EnableIntrinsicFunctions': 'true',
331 'FavorSizeOrSpeed': '0',
332 'OmitFramePointers': 'true',
333 'StringPooling': 'true',
334 },
335 'VCLinkerTool': {
336 'LinkIncremental': '1',
337 'OptimizeReferences': '2',
338 'OptimizeForWindows98': '1',
339 'EnableCOMDATFolding': '2',
340 },
341 },
342 }],
343 ],
344 },
345 },
346 'xcode_settings': {
347 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO',
348 'GCC_ENABLE_CPP_RTTI': 'NO',
349 },
350 },
351 'targets': [
352 # Targets that apply to any architecture.
353 {
354 'target_name': 'js2c',
355 'type': 'none',
356 'variables': {
357 'library_files': [
358 '../../src/runtime.js',
359 '../../src/v8natives.js',
360 '../../src/array.js',
361 '../../src/string.js',
362 '../../src/uri.js',
363 '../../src/math.js',
364 '../../src/messages.js',
365 '../../src/apinatives.js',
366 '../../src/debug-delay.js',
367 '../../src/mirror-delay.js',
368 '../../src/date-delay.js',
369 '../../src/json-delay.js',
370 '../../src/regexp-delay.js',
371 '../../src/macros.py',
372 ],
373 },
374 'actions': [
375 {
376 'action_name': 'js2c',
377 'inputs': [
378 '../../tools/js2c.py',
379 '<@(library_files)',
380 ],
381 'outputs': [
382 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
383 '<(SHARED_INTERMEDIATE_DIR)/libraries-empty.cc',
384 ],
385 'action': ['python', '../../tools/js2c.py', '<@(_outputs)', 'CORE', '<@(library_files)'],
386 },
387 ],
388 },
389 {
390 'target_name': 'd8_js2c',
391 'type': 'none',
392 'variables': {
393 'library_files': [
394 '../../src/d8.js',
395 '../../src/macros.py',
396 ],
397 },
398 'actions': [
399 {
400 'action_name': 'js2c',
401 'inputs': [
402 '../../tools/js2c.py',
403 '<@(library_files)',
404 ],
405 'extra_inputs': [
406 ],
407 'outputs': [
408 '<(SHARED_INTERMEDIATE_DIR)/d8-js.cc',
409 '<(SHARED_INTERMEDIATE_DIR)/d8-js-empty.cc',
410 ],
411 'action': ['python', '../../tools/js2c.py', '<@(_outputs)', 'D8', '<@(library_files)'],
412 },
413 ],
414 },
415
416 # Targets to build v8 for the native architecture (ia32).
417 {
418 'target_name': 'v8_base',
419 'type': '<(library)',
ager@chromium.org5ec48922009-05-05 07:25:34 +0000420 'defines': [
ager@chromium.org9085a012009-05-11 19:22:57 +0000421 'V8_TARGET_ARCH_IA32'
ager@chromium.org5ec48922009-05-05 07:25:34 +0000422 ],
ager@chromium.org3a37e9b2009-04-27 09:26:21 +0000423 'include_dirs+': [
424 '../../src',
425 '../../src/ia32',
426 ],
427 'msvs_guid': 'EC8B7909-62AF-470D-A75D-E1D89C837142',
428 'sources': [
429 '<@(base_source_files)',
430 ],
431 'sources!': [
432 '<@(not_base_source_files)',
433 ],
434 'sources/': [
435 ['exclude', '-arm\\.cc$'],
436 ['exclude', 'src/platform-.*\\.cc$' ],
437 ],
438 'conditions': [
439 ['OS=="linux"',
440 {
441 'link_settings': {
442 'libraries': [
443 # Needed for clock_gettime() used by src/platform-linux.cc.
444 '-lrt',
445 ],
446 },
447 'sources/': [
448 ['include', 'src/platform-linux\\.cc$'],
449 ['include', 'src/platform-posix\\.cc$']
450 ]
451 }
452 ],
453 ['OS=="mac"',
454 {
455 'sources/': [
456 ['include', 'src/platform-macos\\.cc$'],
457 ['include', 'src/platform-posix\\.cc$']
458 ]
459 }
460 ],
461 ['OS=="win"', {
462 'sources/': [['include', 'src/platform-win32\\.cc$']],
463 # 4355, 4800 came from common.vsprops
464 # 4018, 4244 were a per file config on dtoa-config.c
465 # TODO: It's probably possible and desirable to stop disabling the
466 # dtoa-specific warnings by modifying dtoa as was done in Chromium
467 # r9255. Refer to that revision for details.
468 'msvs_disabled_warnings': [4355, 4800, 4018, 4244],
469 'link_settings': {
470 'libraries': [ '-lwinmm.lib' ],
471 },
472 }],
473 ],
474 },
475 {
476 'target_name': 'v8_nosnapshot',
477 'type': '<(library)',
ager@chromium.org5ec48922009-05-05 07:25:34 +0000478 'defines': [
ager@chromium.org9085a012009-05-11 19:22:57 +0000479 'V8_TARGET_ARCH_IA32'
ager@chromium.org5ec48922009-05-05 07:25:34 +0000480 ],
ager@chromium.org3a37e9b2009-04-27 09:26:21 +0000481 'dependencies': [
482 'js2c',
483 'v8_base',
484 ],
485 'include_dirs': [
486 '../../src',
487 ],
488 'sources': [
489 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
490 '../../src/snapshot-empty.cc',
491 ],
492 'export_dependent_settings': [
493 'v8_base',
494 ],
495 },
496 {
497 'target_name': 'mksnapshot',
498 'type': 'executable',
499 'dependencies': [
500 'v8_nosnapshot',
501 ],
502 'msvs_guid': '865575D0-37E2-405E-8CBA-5F6C485B5A26',
503 'sources': [
504 '../../src/mksnapshot.cc',
505 ],
506 },
507 {
508 'target_name': 'v8',
509 'type': '<(library)',
ager@chromium.org5ec48922009-05-05 07:25:34 +0000510 'defines': [
ager@chromium.org9085a012009-05-11 19:22:57 +0000511 'V8_TARGET_ARCH_IA32'
ager@chromium.org5ec48922009-05-05 07:25:34 +0000512 ],
ager@chromium.org3a37e9b2009-04-27 09:26:21 +0000513 'dependencies': [
514 'js2c',
515 'mksnapshot',
516 'v8_base',
517 ],
518 'msvs_guid': '21E22961-22BF-4493-BD3A-868F93DA5179',
519 'actions': [
520 {
521 'action_name': 'mksnapshot',
522 'inputs': [
523 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)',
524 ],
525 'outputs': [
526 '<(INTERMEDIATE_DIR)/snapshot.cc',
527 ],
528 'action': ['<@(_inputs)', '<@(_outputs)'],
529 },
530 ],
531 'include_dirs': [
532 '../../src',
533 ],
534 'sources': [
535 '<(SHARED_INTERMEDIATE_DIR)/libraries-empty.cc',
536 '<(INTERMEDIATE_DIR)/snapshot.cc',
537 ],
538 'direct_dependent_settings': {
539 'include_dirs': [
540 '../../include',
541 ],
542 },
543 'export_dependent_settings': [
544 'v8_base',
545 ],
546 },
547 {
548 'target_name': 'v8_shell',
549 'type': 'executable',
ager@chromium.org5ec48922009-05-05 07:25:34 +0000550 'defines': [
ager@chromium.org9085a012009-05-11 19:22:57 +0000551 'V8_TARGET_ARCH_IA32'
ager@chromium.org5ec48922009-05-05 07:25:34 +0000552 ],
ager@chromium.org3a37e9b2009-04-27 09:26:21 +0000553 'dependencies': [
554 'v8',
555 ],
556 'sources': [
557 '../../samples/shell.cc',
558 ],
559 'conditions': [
560 [ 'OS=="win"', {
561 # This could be gotten by not setting chromium_code, if that's OK.
562 'defines': ['_CRT_SECURE_NO_WARNINGS'],
563 }],
564 ],
565 },
566 ],
567
568 'conditions': [ ['OS=="mac"', { 'targets': [
569 # TODO(bradnelson): temporarily disable 'd8' target on Windows while
570 # we work fix the performance regressions.
571 # TODO(sgk): temporarily disable 'd8' target on Linux while
572 # we work out getting the readline library on all the systems.
573 {
574 'target_name': 'd8',
575 'type': 'executable',
576 'dependencies': [
577 'd8_js2c',
578 'v8',
579 ],
ager@chromium.org5ec48922009-05-05 07:25:34 +0000580 'defines': [
ager@chromium.org9085a012009-05-11 19:22:57 +0000581 'V8_TARGET_ARCH_IA32'
ager@chromium.org5ec48922009-05-05 07:25:34 +0000582 ],
ager@chromium.org3a37e9b2009-04-27 09:26:21 +0000583 'include_dirs': [
584 '../../src',
585 ],
586 'sources': [
587 '<(SHARED_INTERMEDIATE_DIR)/d8-js.cc',
588 '<@(d8_source_files)',
589 ],
590 'conditions': [
591 [ 'OS=="linux"', {
592 'sources!': [ '../../src/d8-windows.cc' ],
593 'link_settings': { 'libraries': [ '-lreadline' ] },
594 }],
595 [ 'OS=="mac"', {
596 'sources!': [ '../../src/d8-windows.cc' ],
597 'link_settings': { 'libraries': [
598 '$(SDKROOT)/usr/lib/libreadline.dylib'
599 ]},
600 }],
601 [ 'OS=="win"', {
602 'sources!': [ '../../src/d8-readline.cc', '../../src/d8-posix.cc' ],
603 }],
604 ],
605 },
606 # TODO(sgk): temporarily disable the arm targets on Linux while
607 # we work out how to refactor the generator and/or add configuration
608 # settings to the .gyp file to handle building both variants in
609 # the same output directory.
610 #
611 # ARM targets, to test ARM code generation. These use an ARM simulator
612 # (src/simulator-arm.cc). The ARM targets are not snapshot-enabled.
613 {
614 'target_name': 'v8_arm',
615 'type': '<(library)',
616 'dependencies': [
617 'js2c',
618 ],
619 'defines': [
ager@chromium.org9085a012009-05-11 19:22:57 +0000620 'V8_TARGET_ARCH_ARM',
ager@chromium.org3a37e9b2009-04-27 09:26:21 +0000621 ],
622 'include_dirs+': [
623 '../../src',
624 '../../src/arm',
625 ],
626 'sources': [
627 '<@(base_source_files)',
628 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
629 '../../src/snapshot-empty.cc',
630 ],
631 'sources!': [
632 '<@(not_base_source_files)',
633 ],
634 'sources/': [
635 ['exclude', '-ia32\\.cc$'],
636 ['exclude', 'src/platform-.*\\.cc$' ],
637 ],
638 'direct_dependent_settings': {
639 'include_dirs': [
640 '../../include',
641 ],
642 },
643 'conditions': [
644 ['OS=="linux"',
645 {
646 'sources/': [
647 ['include', 'src/platform-linux\\.cc$'],
648 ['include', 'src/platform-posix\\.cc$']
649 ]
650 }
651 ],
652 ['OS=="mac"',
653 {
654 'sources/': [
655 ['include', 'src/platform-macos\\.cc$'],
656 ['include', 'src/platform-posix\\.cc$']
657 ]
658 }
659 ],
660 ['OS=="win"', {
661 'sources/': [['include', 'src/platform-win32\\.cc$']],
662 # 4355, 4800 came from common.vsprops
663 # 4018, 4244 were a per file config on dtoa-config.c
664 # TODO: It's probably possible and desirable to stop disabling the
665 # dtoa-specific warnings by modifying dtoa as was done in Chromium
666 # r9255. Refer to that revision for details.
667 'msvs_disabled_warnings': [4355, 4800, 4018, 4244],
668 }],
669 ],
670 },
671 {
672 'target_name': 'v8_shell_arm',
673 'type': 'executable',
674 'dependencies': [
675 'v8_arm',
676 ],
677 'defines': [
ager@chromium.org9085a012009-05-11 19:22:57 +0000678 'V8_TARGET_ARCH_ARM',
ager@chromium.org3a37e9b2009-04-27 09:26:21 +0000679 ],
680 'sources': [
681 '../../samples/shell.cc',
682 ],
683 'conditions': [
684 [ 'OS=="win"', {
685 # This could be gotten by not setting chromium_code, if that's OK.
686 'defines': ['_CRT_SECURE_NO_WARNINGS'],
687 }],
688 ],
689 },
690 {
691 'target_name': 'd8_arm',
692 'type': 'executable',
693 'dependencies': [
694 'd8_js2c',
695 'v8_arm',
696 ],
697 'defines': [
ager@chromium.org9085a012009-05-11 19:22:57 +0000698 'V8_TARGET_ARCH_ARM',
ager@chromium.org3a37e9b2009-04-27 09:26:21 +0000699 ],
700 'include_dirs': [
701 '../../src',
702 ],
703 'sources': [
704 '<(SHARED_INTERMEDIATE_DIR)/d8-js.cc',
705 '<@(d8_source_files)',
706 ],
707 'conditions': [
708 [ 'OS=="linux"', {
709 'sources!': [ '../../src/d8-windows.cc' ],
710 'link_settings': { 'libraries': [ '-lreadline' ] },
711 }],
712 [ 'OS=="mac"', {
713 'sources!': [ '../../src/d8-windows.cc' ],
714 'link_settings': { 'libraries': [
715 '$(SDKROOT)/usr/lib/libreadline.dylib'
716 ]},
717 }],
718 [ 'OS=="win"', {
719 'sources!': [ '../../src/d8-readline.cc', '../../src/d8-posix.cc' ],
720 }],
721 ],
722 },
723 ]}], # OS != "linux" (temporary, TODO(sgk))
724
725
726 ['OS=="win"', {
727 'target_defaults': {
728 'defines': [
729 '_USE_32BIT_TIME_T',
730 '_CRT_SECURE_NO_DEPRECATE',
731 '_CRT_NONSTDC_NO_DEPRECATE',
732 ],
733 'msvs_settings': {
734 'VCLinkerTool': {
735 'AdditionalOptions': '/IGNORE:4221 /NXCOMPAT',
736 },
737 },
738 },
739 }],
740 ],
741}