OLD | NEW |
1 # Copyright 2010 the V8 project authors. All rights reserved. | 1 # Copyright 2010 the V8 project authors. All rights reserved. |
2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
4 # met: | 4 # met: |
5 # | 5 # |
6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 'CCFLAGS': ['-m32'], | 147 'CCFLAGS': ['-m32'], |
148 'LINKFLAGS': ['-m32'] | 148 'LINKFLAGS': ['-m32'] |
149 }, | 149 }, |
150 'arch:arm': { | 150 'arch:arm': { |
151 'CPPDEFINES': ['V8_TARGET_ARCH_ARM'], | 151 'CPPDEFINES': ['V8_TARGET_ARCH_ARM'], |
152 'unalignedaccesses:on' : { | 152 'unalignedaccesses:on' : { |
153 'CPPDEFINES' : ['CAN_USE_UNALIGNED_ACCESSES=1'] | 153 'CPPDEFINES' : ['CAN_USE_UNALIGNED_ACCESSES=1'] |
154 }, | 154 }, |
155 'unalignedaccesses:off' : { | 155 'unalignedaccesses:off' : { |
156 'CPPDEFINES' : ['CAN_USE_UNALIGNED_ACCESSES=0'] | 156 'CPPDEFINES' : ['CAN_USE_UNALIGNED_ACCESSES=0'] |
| 157 }, |
| 158 'armeabi:softfloat' : { |
| 159 'CPPDEFINES' : ['USE_EABI_HARDFLOAT=0'], |
| 160 'simulator:none': { |
| 161 'CCFLAGS': ['-mfloat-abi=softfp'], |
| 162 } |
| 163 }, |
| 164 'armeabi:hardfloat' : { |
| 165 'CPPDEFINES' : ['USE_EABI_HARDFLOAT=1', 'CAN_USE_VFP_INSTRUCTIONS'], |
| 166 'simulator:none': { |
| 167 'CCFLAGS': ['-mfloat-abi=hard'], |
| 168 } |
157 } | 169 } |
158 }, | 170 }, |
159 'simulator:arm': { | 171 'simulator:arm': { |
160 'CCFLAGS': ['-m32'], | 172 'CCFLAGS': ['-m32'], |
161 'LINKFLAGS': ['-m32'], | 173 'LINKFLAGS': ['-m32'], |
162 }, | 174 }, |
163 'arch:mips': { | 175 'arch:mips': { |
164 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'], | 176 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'], |
165 'mips_arch_variant:mips32r2': { | 177 'mips_arch_variant:mips32r2': { |
166 'CPPDEFINES': ['_MIPS_ARCH_MIPS32R2'] | 178 'CPPDEFINES': ['_MIPS_ARCH_MIPS32R2'] |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 'WARNINGFLAGS': ['-pedantic'], | 291 'WARNINGFLAGS': ['-pedantic'], |
280 'library:shared': { | 292 'library:shared': { |
281 'soname:on': { | 293 'soname:on': { |
282 'LINKFLAGS': ['-Wl,-soname,${SONAME}'] | 294 'LINKFLAGS': ['-Wl,-soname,${SONAME}'] |
283 } | 295 } |
284 } | 296 } |
285 }, | 297 }, |
286 'os:macos': { | 298 'os:macos': { |
287 'WARNINGFLAGS': ['-pedantic'] | 299 'WARNINGFLAGS': ['-pedantic'] |
288 }, | 300 }, |
| 301 'arch:arm': { |
| 302 # This is to silence warnings about ABI changes that some versions of the |
| 303 # CodeSourcery G++ tool chain produce for each occurrence of varargs. |
| 304 'WARNINGFLAGS': ['-Wno-abi'] |
| 305 }, |
289 'disassembler:on': { | 306 'disassembler:on': { |
290 'CPPDEFINES': ['ENABLE_DISASSEMBLER'] | 307 'CPPDEFINES': ['ENABLE_DISASSEMBLER'] |
291 } | 308 } |
292 }, | 309 }, |
293 'msvc': { | 310 'msvc': { |
294 'all': { | 311 'all': { |
295 'WARNINGFLAGS': ['/W3', '/WX', '/wd4351', '/wd4355', '/wd4800'] | 312 'WARNINGFLAGS': ['/W3', '/WX', '/wd4351', '/wd4355', '/wd4800'] |
296 }, | 313 }, |
297 'library:shared': { | 314 'library:shared': { |
298 'CPPDEFINES': ['BUILDING_V8_SHARED'], | 315 'CPPDEFINES': ['BUILDING_V8_SHARED'], |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 } | 379 } |
363 } | 380 } |
364 | 381 |
365 | 382 |
366 CCTEST_EXTRA_FLAGS = { | 383 CCTEST_EXTRA_FLAGS = { |
367 'all': { | 384 'all': { |
368 'CPPPATH': [join(root_dir, 'src')], | 385 'CPPPATH': [join(root_dir, 'src')], |
369 }, | 386 }, |
370 'gcc': { | 387 'gcc': { |
371 'all': { | 388 'all': { |
372 'LIBPATH': [abspath('.')] | 389 'LIBPATH': [abspath('.')], |
| 390 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], |
| 391 'CXXFLAGS': ['$CCFLAGS', '-fno-rtti', '-fno-exceptions'], |
| 392 'LINKFLAGS': ['$CCFLAGS'], |
373 }, | 393 }, |
374 'os:linux': { | 394 'os:linux': { |
375 'LIBS': ['pthread'], | 395 'LIBS': ['pthread'], |
376 }, | 396 }, |
377 'os:macos': { | 397 'os:macos': { |
378 'LIBS': ['pthread'], | 398 'LIBS': ['pthread'], |
379 }, | 399 }, |
380 'os:freebsd': { | 400 'os:freebsd': { |
381 'LIBS': ['execinfo', 'pthread'] | 401 'LIBS': ['execinfo', 'pthread'] |
382 }, | 402 }, |
(...skipping 29 matching lines...) Expand all Loading... |
412 } | 432 } |
413 } | 433 } |
414 | 434 |
415 | 435 |
416 SAMPLE_FLAGS = { | 436 SAMPLE_FLAGS = { |
417 'all': { | 437 'all': { |
418 'CPPPATH': [join(abspath('.'), 'include')], | 438 'CPPPATH': [join(abspath('.'), 'include')], |
419 }, | 439 }, |
420 'gcc': { | 440 'gcc': { |
421 'all': { | 441 'all': { |
422 'LIBPATH': ['.'], | 442 'LIBPATH': ['.'], |
423 'CCFLAGS': ['-fno-rtti', '-fno-exceptions'] | 443 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], |
| 444 'CXXFLAGS': ['$CCFLAGS', '-fno-rtti', '-fno-exceptions'], |
| 445 'LINKFLAGS': ['$CCFLAGS'], |
424 }, | 446 }, |
425 'os:linux': { | 447 'os:linux': { |
426 'LIBS': ['pthread'], | 448 'LIBS': ['pthread'], |
427 }, | 449 }, |
428 'os:macos': { | 450 'os:macos': { |
429 'LIBS': ['pthread'], | 451 'LIBS': ['pthread'], |
430 }, | 452 }, |
431 'os:freebsd': { | 453 'os:freebsd': { |
432 'LIBPATH' : ['/usr/local/lib'], | 454 'LIBPATH' : ['/usr/local/lib'], |
433 'LIBS': ['execinfo', 'pthread'] | 455 'LIBS': ['execinfo', 'pthread'] |
434 }, | 456 }, |
435 'os:solaris': { | 457 'os:solaris': { |
436 'LIBPATH' : ['/usr/local/lib'], | 458 'LIBPATH' : ['/usr/local/lib'], |
437 'LIBS': ['m', 'pthread', 'socket', 'nsl', 'rt'], | 459 'LIBS': ['m', 'pthread', 'socket', 'nsl', 'rt'], |
438 'LINKFLAGS': ['-mt'] | 460 'LINKFLAGS': ['-mt'] |
439 }, | 461 }, |
440 'os:openbsd': { | 462 'os:openbsd': { |
441 'LIBPATH' : ['/usr/local/lib'], | 463 'LIBPATH' : ['/usr/local/lib'], |
442 'LIBS': ['execinfo', 'pthread'] | 464 'LIBS': ['execinfo', 'pthread'] |
443 }, | 465 }, |
444 'os:win32': { | 466 'os:win32': { |
445 'LIBS': ['winmm', 'ws2_32'] | 467 'LIBS': ['winmm', 'ws2_32'] |
446 }, | 468 }, |
447 'arch:arm': { | 469 'arch:arm': { |
448 'LINKFLAGS': ARM_LINK_FLAGS | 470 'LINKFLAGS': ARM_LINK_FLAGS, |
| 471 'armeabi:softfloat' : { |
| 472 'CPPDEFINES' : ['USE_EABI_HARDFLOAT=0'], |
| 473 'simulator:none': { |
| 474 'CCFLAGS': ['-mfloat-abi=softfp'], |
| 475 } |
| 476 }, |
| 477 'armeabi:hardfloat' : { |
| 478 'CPPDEFINES' : ['USE_EABI_HARDFLOAT=1', 'CAN_USE_VFP_INSTRUCTIONS'], |
| 479 'simulator:none': { |
| 480 'CCFLAGS': ['-mfloat-abi=hard'], |
| 481 } |
| 482 } |
449 }, | 483 }, |
450 'arch:ia32': { | 484 'arch:ia32': { |
451 'CCFLAGS': ['-m32'], | 485 'CCFLAGS': ['-m32'], |
452 'LINKFLAGS': ['-m32'] | 486 'LINKFLAGS': ['-m32'] |
453 }, | 487 }, |
454 'arch:x64': { | 488 'arch:x64': { |
455 'CCFLAGS': ['-m64'], | 489 'CCFLAGS': ['-m64'], |
456 'LINKFLAGS': ['-m64'] | 490 'LINKFLAGS': ['-m64'] |
457 }, | 491 }, |
458 'arch:mips': { | 492 'arch:mips': { |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 } | 574 } |
541 } | 575 } |
542 | 576 |
543 | 577 |
544 PREPARSER_FLAGS = { | 578 PREPARSER_FLAGS = { |
545 'all': { | 579 'all': { |
546 'CPPPATH': [join(abspath('.'), 'include'), join(abspath('.'), 'src')] | 580 'CPPPATH': [join(abspath('.'), 'include'), join(abspath('.'), 'src')] |
547 }, | 581 }, |
548 'gcc': { | 582 'gcc': { |
549 'all': { | 583 'all': { |
550 'LIBPATH': ['.'], | 584 'LIBPATH': ['.'], |
551 'CCFLAGS': ['-fno-rtti', '-fno-exceptions'] | 585 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], |
| 586 'CXXFLAGS': ['$CCFLAGS', '-fno-rtti', '-fno-exceptions'], |
| 587 'LINKFLAGS': ['$CCFLAGS'], |
552 }, | 588 }, |
553 'os:win32': { | 589 'os:win32': { |
554 'LIBS': ['winmm', 'ws2_32'] | 590 'LIBS': ['winmm', 'ws2_32'] |
555 }, | 591 }, |
556 'arch:arm': { | 592 'arch:arm': { |
557 'LINKFLAGS': ARM_LINK_FLAGS | 593 'LINKFLAGS': ARM_LINK_FLAGS, |
| 594 'armeabi:softfloat' : { |
| 595 'simulator:none': { |
| 596 'CCFLAGS': ['-mfloat-abi=softfp'], |
| 597 } |
| 598 }, |
| 599 'armeabi:hardfloat' : { |
| 600 'simulator:none': { |
| 601 'CCFLAGS': ['-mfloat-abi=hard'], |
| 602 } |
| 603 } |
558 }, | 604 }, |
559 'arch:ia32': { | 605 'arch:ia32': { |
560 'CCFLAGS': ['-m32'], | 606 'CCFLAGS': ['-m32'], |
561 'LINKFLAGS': ['-m32'] | 607 'LINKFLAGS': ['-m32'] |
562 }, | 608 }, |
563 'arch:x64': { | 609 'arch:x64': { |
564 'CCFLAGS': ['-m64'], | 610 'CCFLAGS': ['-m64'], |
565 'LINKFLAGS': ['-m64'] | 611 'LINKFLAGS': ['-m64'] |
566 }, | 612 }, |
567 'arch:mips': { | 613 'arch:mips': { |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 'msvcrt:shared': { | 713 'msvcrt:shared': { |
668 'CCFLAGS': ['/MDd'] | 714 'CCFLAGS': ['/MDd'] |
669 } | 715 } |
670 } | 716 } |
671 } | 717 } |
672 } | 718 } |
673 | 719 |
674 | 720 |
675 D8_FLAGS = { | 721 D8_FLAGS = { |
676 'gcc': { | 722 'gcc': { |
| 723 'all': { |
| 724 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], |
| 725 'CXXFLAGS': ['$CCFLAGS', '-fno-rtti', '-fno-exceptions'], |
| 726 'LINKFLAGS': ['$CCFLAGS'], |
| 727 }, |
677 'console:readline': { | 728 'console:readline': { |
678 'LIBS': ['readline'] | 729 'LIBS': ['readline'] |
679 }, | 730 }, |
680 'os:linux': { | 731 'os:linux': { |
681 'LIBS': ['pthread'], | 732 'LIBS': ['pthread'], |
682 }, | 733 }, |
683 'os:macos': { | 734 'os:macos': { |
684 'LIBS': ['pthread'], | 735 'LIBS': ['pthread'], |
685 }, | 736 }, |
686 'os:freebsd': { | 737 'os:freebsd': { |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 'strictaliasing': { | 954 'strictaliasing': { |
904 'values': ['default', 'off'], | 955 'values': ['default', 'off'], |
905 'guess': GuessStrictAliasing, | 956 'guess': GuessStrictAliasing, |
906 'help': 'assume strict aliasing while optimizing' | 957 'help': 'assume strict aliasing while optimizing' |
907 }, | 958 }, |
908 'pgo': { | 959 'pgo': { |
909 'values': ['off', 'instrument', 'optimize'], | 960 'values': ['off', 'instrument', 'optimize'], |
910 'default': 'off', | 961 'default': 'off', |
911 'help': 'select profile guided optimization variant', | 962 'help': 'select profile guided optimization variant', |
912 }, | 963 }, |
| 964 'armeabi': { |
| 965 'values': ['hardfloat', 'softfloat'], |
| 966 'default': 'softfloat', |
| 967 'help': 'generate calling conventiont according to selected ARM EABI variant
' |
| 968 }, |
913 'mipsabi': { | 969 'mipsabi': { |
914 'values': ['hardfloat', 'softfloat', 'none'], | 970 'values': ['hardfloat', 'softfloat', 'none'], |
915 'default': 'hardfloat', | 971 'default': 'hardfloat', |
916 'help': 'generate calling conventiont according to selected mips ABI' | 972 'help': 'generate calling conventiont according to selected mips ABI' |
917 }, | 973 }, |
918 'mips_arch_variant': { | 974 'mips_arch_variant': { |
919 'values': ['mips32r2', 'mips32r1'], | 975 'values': ['mips32r2', 'mips32r1'], |
920 'default': 'mips32r2', | 976 'default': 'mips32r2', |
921 'help': 'mips variant' | 977 'help': 'mips variant' |
922 } | 978 } |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1353 # version of scons. Also, there's a bug in some revisions that | 1409 # version of scons. Also, there's a bug in some revisions that |
1354 # doesn't allow this flag to be set, so we swallow any exceptions. | 1410 # doesn't allow this flag to be set, so we swallow any exceptions. |
1355 # Lovely. | 1411 # Lovely. |
1356 try: | 1412 try: |
1357 SetOption('warn', 'no-deprecated') | 1413 SetOption('warn', 'no-deprecated') |
1358 except: | 1414 except: |
1359 pass | 1415 pass |
1360 | 1416 |
1361 | 1417 |
1362 Build() | 1418 Build() |
OLD | NEW |